;;; 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 <rs@nunatak.allgaeu.org>
;; (did not show signs of life (Nov 2001) -stef)
"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'.
(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)
(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))
(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]+\\)?" "['’]")
;; 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 <URL:ftp://ftp-swiss.ai.mit.edu/pub/scm>
:doc-spec '(("(r5rs)Index" nil
(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))
\f
(provide 'info-look)