]> code.delx.au - gnu-emacs/blobdiff - lisp/info-look.el
(mode-require-final-newline): Revert accidental change.
[gnu-emacs] / lisp / info-look.el
index 4bc90c7e5aa24a34cfcc34a45dfe8f96887d73ef..4fc2c6b4c632744aa7cf72f41823f32a50c3a123 100644 (file)
@@ -1,7 +1,7 @@
 ;;; info-look.el --- major-mode-sensitive Info index lookup facility
 ;; An older version of this was known as libc.el.
 
-;; Copyright (C) 1995,96,97,98,99,2001,03,04  Free Software Foundation, Inc.
+;; Copyright (C) 1995,96,97,98,99,2001,03,04,05  Free Software Foundation, Inc.
 
 ;; Author: Ralph Schleicher <rs@nunatak.allgaeu.org>
 ;;         (did not show signs of life (Nov 2001)  -stef)
@@ -47,7 +47,7 @@ Automatically becomes buffer local when set in any fashion.")
   "Non-nil means pop up the Info buffer in another window."
   :group 'info-lookup :type 'boolean)
 
-(defcustom info-lookup-highlight-face 'highlight
+(defcustom info-lookup-highlight-face 'match
   "Face for highlighting looked up help items.
 Setting this variable to nil disables highlighting."
   :group 'info-lookup :type 'face)
@@ -634,8 +634,15 @@ Return nil if there is nothing appropriate in the buffer near point."
  :regexp "\\(struct \\|union \\|enum \\)?[_a-zA-Z][_a-zA-Z0-9]*"
  :doc-spec '(("(libc)Function Index" nil
              "^[ \t]+-+ \\(Function\\|Macro\\): .*\\<" "\\>")
+             ;; prefix/suffix has to match things like
+             ;;   " -- Macro: int F_DUPFD"
+             ;;   " -- Variable: char * tzname [2]"
+             ;;   "`DBL_MAX'"    (texinfo @table)
+             ;; suffix "\\>" is not used because that sends DBL_MAX to
+             ;; DBL_MAX_EXP ("_" is a non-word char)
             ("(libc)Variable Index" nil
-             "^[ \t]+-+ \\(Variable\\|Macro\\): .*\\<" "\\>")
+              "^\\([ \t]+-+ \\(Variable\\|Macro\\): .*\\<\\|`\\)"
+              "\\( \\|'?$\\)")
             ("(libc)Type Index" nil
              "^[ \t]+-+ Data Type: \\<" "\\>")
             ("(termcap)Var Index" nil
@@ -894,7 +901,7 @@ Return nil if there is nothing appropriate in the buffer near point."
 ;; entries for the same term in some cases.  --fx
 (info-lookup-maybe-add-help
  :mode 'cfengine-mode
- :regexp "[[:alnum:]_]+\\(:?()\\)?"
+ :regexp "[[:alnum:]_]+\\(?:()\\)?"
  :doc-spec '(("(cfengine-Reference)Variable Index"
              (lambda (item)
                ;; Index entries may be like `IsPlain()'