(emacs-lisp-mode): Add prefix/suffix matching regexps.
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 5 Apr 2003 12:59:38 +0000 (12:59 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 5 Apr 2003 12:59:38 +0000 (12:59 +0000)
lisp/ChangeLog
lisp/info-look.el

index 9889767..6409f87 100644 (file)
@@ -1,3 +1,7 @@
+2003-04-05  Kevin Ryde  <user42@zip.com.au>
+
+       * info-look.el (emacs-lisp-mode): Add prefix/suffix matching regexps.
+
 2003-04-04  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 
        * subr.el (number-sequence): Adjust code.
index bc360a1..b4a8d3b 100644 (file)
@@ -756,9 +756,19 @@ Return nil if there is nothing appropriate in the buffer near point."
 (info-lookup-maybe-add-help
  :mode 'emacs-lisp-mode
  :regexp "[^][()'\" \t\n]+"
- :doc-spec '(("(emacs)Command Index")
-            ("(emacs)Variable Index")
-            ("(elisp)Index")))
+ :doc-spec '(;; Commands with key sequences appear in nodes as `foo' and
+             ;; those without as `M-x foo'.
+             ("(emacs)Command Index"  nil "`\\(M-x[ \t\n]+\\)?" "'")
+             ;; Variables normally appear in nodes as just `foo'.
+             ("(emacs)Variable Index" nil "`" "'")
+             ;; Almost all functions, variables, etc appear in nodes as
+             ;; " - Function: foo" etc.  A small number of aliases and
+             ;; symbols appear only as `foo', and will miss out on exact
+             ;; positions.  Allowing `foo' would hit too many false matches
+             ;; for things that should go to Function: etc, and those latter
+             ;; are much more important.  Perhaps this could change if some
+             ;; sort of fallback match scheme existed.
+             ("(elisp)Index"          nil "^ - .*: " "\\( \\|$\\)")))
 
 (info-lookup-maybe-add-help
  :mode 'lisp-interaction-mode