]> code.delx.au - gnu-emacs/blobdiff - lisp/info-look.el
Update AUCTeX
[gnu-emacs] / lisp / info-look.el
index 8e09f32601976efc5372e33206a71cadd2cc86e3..644ee3d6c2092d7195a93eac12426182831b6a09 100644 (file)
@@ -887,11 +887,21 @@ Return nil if there is nothing appropriate in the buffer near point."
                       ((string-equal item "gawk, versions of, information about, printing")
                        "gawk"))))))
 
+;; This misses some things which occur as node names but not in the
+;; index.  Unfortunately it also picks up the wrong one of multiple
+;; entries for the same term in some cases.  --fx
 (info-lookup-maybe-add-help
  :mode 'cfengine-mode
- :regexp "[[:alnum:]_]+"
- :doc-spec '(("(cfengine-Reference)Variable Index" nil
-             "^ - [^:]+:[ ]+\\(\\[[^=]*=[ ]+\\)?" nil)))
+ :regexp "[[:alnum:]_]+\\(:?()\\)?"
+ :doc-spec '(("(cfengine-Reference)Variable Index"
+             (lambda (item)
+               ;; Index entries may be like `IsPlain()'
+               (if (string-match "\\([[:alnum:]_]+\\)()" item)
+                   (match-string 1 item)
+                 item))
+             ;; This gets functions in evaluated classes.  Other
+             ;; possible patterns don't seem to work too well.
+             "`" "(")))
 \f
 (provide 'info-look)