X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/c1b8b17a7ac22123fe8d2d647265f19d2cc92625..4b9ac23960d2998f899287ffcf696ad33b63a69a:/lisp/info-look.el diff --git a/lisp/info-look.el b/lisp/info-look.el index 9cf185edf5..899f41e850 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -1,7 +1,7 @@ ;;; info-look.el --- major-mode-sensitive Info index lookup facility -*- lexical-binding: t -*- ;; An older version of this was known as libc.el. -;; Copyright (C) 1995-1999, 2001-2015 Free Software Foundation, Inc. +;; Copyright (C) 1995-1999, 2001-2016 Free Software Foundation, Inc. ;; Author: Ralph Schleicher ;; (did not show signs of life (Nov 2001) -stef) @@ -142,7 +142,7 @@ OTHER-MODES is a list of cross references to other help modes.") "Add or update a help specification. Function arguments are specified as keyword/argument pairs: - \(KEYWORD . ARGUMENT) + (KEYWORD . ARGUMENT) KEYWORD is either `:topic', `:mode', `:regexp', `:ignore-case', `:doc-spec', `:parse-rule', or `:other-modes'. @@ -613,8 +613,8 @@ Return nil if there is nothing appropriate in the buffer near point." (condition-case nil (save-excursion (let ((case-fold-search t) - (ignored-chars "][()`',:.\" \t\n") - (significant-chars "^][()`',:.\" \t\n") + (ignored-chars "][()`'‘’,:.\" \t\n") + (significant-chars "^][()`'‘’,:.\" \t\n") beg end) (cond ((and (memq (get-char-property (point) 'face) @@ -634,7 +634,8 @@ Return nil if there is nothing appropriate in the buffer near point." (setq end (point)) (> end beg)) (and (looking-at "[ \t\n]") - (looking-back (concat "[" significant-chars "]")) + (looking-back (concat "[" significant-chars "]") + (1- (point))) (setq end (point)) (skip-chars-backward significant-chars) (setq beg (point)) @@ -898,7 +899,7 @@ Return nil if there is nothing appropriate in the buffer near point." (info-lookup-maybe-add-help :mode 'emacs-lisp-mode - :regexp "[^][()`',\" \t\n]+" + :regexp "[^][()`'‘’,\" \t\n]+" :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]+\\)?" "['’]") @@ -911,29 +912,31 @@ Return nil if there is nothing appropriate in the buffer near point." ;; 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 "^ -+ .*: " "\\( \\|$\\)"))) + ("(elisp)Index" nil "^ -+ .*: " "\\( \\|$\\)") + ("(cl)Function Index" nil "^ -+ .*: " "\\( \\|$\\)") + ("(cl)Variable Index" nil "^ -+ .*: " "\\( \\|$\\)"))) ;; docstrings talk about elisp, so have apropos-mode follow emacs-lisp-mode (info-lookup-maybe-add-help :mode 'apropos-mode - :regexp "[^][()`',\" \t\n]+" ;; same as emacs-lisp-mode above + :regexp "[^][()`'‘’,\" \t\n]+" ;; same as emacs-lisp-mode above :other-modes '(emacs-lisp-mode)) (info-lookup-maybe-add-help :mode 'lisp-interaction-mode - :regexp "[^][()`',\" \t\n]+" + :regexp "[^][()`'‘’,\" \t\n]+" :parse-rule 'ignore :other-modes '(emacs-lisp-mode)) (info-lookup-maybe-add-help :mode 'lisp-mode - :regexp "[^()`',\" \t\n]+" + :regexp "[^()`'‘’,\" \t\n]+" :parse-rule 'ignore :other-modes '(emacs-lisp-mode)) (info-lookup-maybe-add-help :mode 'scheme-mode - :regexp "[^()`',\" \t\n]+" + :regexp "[^()`'‘’,\" \t\n]+" :ignore-case t ;; Aubrey Jaffer's rendition from :doc-spec '(("(r5rs)Index" nil @@ -1040,13 +1043,13 @@ Return nil if there is nothing appropriate in the buffer near point." (info-lookup-maybe-add-help :mode 'Custom-mode :ignore-case t - :regexp "[^][()`',:\" \t\n]+" + :regexp "[^][()`'‘’,:\" \t\n]+" :parse-rule 'info-lookup-guess-custom-symbol :other-modes '(emacs-lisp-mode)) (info-lookup-maybe-add-help :mode 'help-mode - :regexp "[^][()`',:\" \t\n]+" + :regexp "[^][()`'‘’,:\" \t\n]+" :other-modes '(emacs-lisp-mode)) (provide 'info-look)