# HG changeset patch # User Stefan Monnier # Date 1083265760 0 # Node ID 373bc9e19710e108bf054e3b5d8fcd99a6b752da # Parent 37068e6cd6449b2e35ef1a8dbe79796c22d42f55 (cfengine-mode): Accept a terminal (). diff -r 37068e6cd644 -r 373bc9e19710 lisp/info-look.el --- a/lisp/info-look.el Thu Apr 29 19:02:12 2004 +0000 +++ b/lisp/info-look.el Thu Apr 29 19:09:20 2004 +0000 @@ -887,11 +887,21 @@ ((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. + "`" "("))) (provide 'info-look)