Add a *Help* command that'll take you to the lispref manual
* doc/emacs/help.texi (Help Mode): Document it. * lisp/help-mode.el (help-mode-map): Add an `I' keystroke. (help-goto-lispref-info): New command. * lisp/info-look.el (:mode): Add an entry for the lispref manual.
This commit is contained in:
parent
487a0be7f7
commit
031c2e4679
3 changed files with 19 additions and 0 deletions
|
@ -478,6 +478,9 @@ View the source of the current help topic (if any)
|
|||
(@code{help-view-source}).
|
||||
@item i
|
||||
Look up the current topic in the manual(s) (@code{help-goto-info}).
|
||||
@item I
|
||||
Look up the current topic in the Emacs Lisp manual
|
||||
(@code{help-goto-lispref-info}).
|
||||
@item c
|
||||
Customize the variable or the face (@code{help-customize}).
|
||||
@end table
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
(define-key map [XF86Forward] 'help-go-forward)
|
||||
(define-key map "\C-c\C-c" 'help-follow-symbol)
|
||||
(define-key map "s" 'help-view-source)
|
||||
(define-key map "I" 'help-goto-lispref-info)
|
||||
(define-key map "i" 'help-goto-info)
|
||||
(define-key map "c" 'help-customize)
|
||||
map)
|
||||
|
@ -819,6 +820,14 @@ The help buffers are divided into \"pages\" by the ^L character."
|
|||
(info-lookup-symbol (plist-get help-mode--current-data :symbol)
|
||||
'emacs-lisp-mode))
|
||||
|
||||
(defun help-goto-lispref-info ()
|
||||
"View the Emacs Lisp manual *info* node of the current help item."
|
||||
(interactive nil help-mode)
|
||||
(unless help-mode--current-data
|
||||
(error "No symbol to look up in the current buffer"))
|
||||
(info-lookup-symbol (plist-get help-mode--current-data :symbol)
|
||||
'emacs-lisp-only))
|
||||
|
||||
(defun help-customize ()
|
||||
"Customize variable or face whose doc string is shown in the current buffer."
|
||||
(interactive nil help-mode)
|
||||
|
|
|
@ -1010,6 +1010,13 @@ Return nil if there is nothing appropriate in the buffer near point."
|
|||
("(cl)Function Index" nil "^ -+ .*: " "\\( \\|$\\)")
|
||||
("(cl)Variable Index" nil "^ -+ .*: " "\\( \\|$\\)")))
|
||||
|
||||
(info-lookup-maybe-add-help
|
||||
:mode 'emacs-lisp-only
|
||||
:regexp "[^][()`'‘’,\" \t\n]+"
|
||||
:doc-spec '(("(elisp)Index" nil "^ -+ .*: " "\\( \\|$\\)")
|
||||
("(cl)Function Index" nil "^ -+ .*: " "\\( \\|$\\)")
|
||||
("(cl)Variable Index" nil "^ -+ .*: " "\\( \\|$\\)")))
|
||||
|
||||
(mapc
|
||||
(lambda (elem)
|
||||
(let* ((prefix (car elem)))
|
||||
|
|
Loading…
Add table
Reference in a new issue