summaryrefslogtreecommitdiff
path: root/lisp/info-look.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2003-04-05 12:59:38 +0000
committerJuanma Barranquero <lekktu@gmail.com>2003-04-05 12:59:38 +0000
commit16524b9bcb60c6fe683b8143220b9bec0ced3995 (patch)
tree8cfeda6340acdabf95f397d47ccbf85838260c87 /lisp/info-look.el
parentafc9c9e4a2cc3864cd9251ef15ff4a5e082069cc (diff)
downloademacs-16524b9bcb60c6fe683b8143220b9bec0ced3995.tar.gz
(emacs-lisp-mode): Add prefix/suffix matching regexps.
Diffstat (limited to 'lisp/info-look.el')
-rw-r--r--lisp/info-look.el16
1 files changed, 13 insertions, 3 deletions
diff --git a/lisp/info-look.el b/lisp/info-look.el
index bc360a1d57d..b4a8d3be6a8 100644
--- a/lisp/info-look.el
+++ b/lisp/info-look.el
@@ -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