** Help
+++
-*** New command 'help-view-source' ('s')
-This command will view the source file (if any) of the current help
-topic.
-
-+++
-*** New command 'help-goto-info' ('i')
-This command will look up the current symbol (if any) in Info.
+*** New convenience commands with short keys in the Help buffer.
+New command 'help-view-source' ('s') will view the source file (if
+any) of the current help topic. New command 'help-goto-info' ('i')
+will look up the current symbol (if any) in Info. New command
+'help-customize' ('c') will customize the variable or the face
+(if any) whose doc string is being shown in the Help buffer.
---
*** The 'help-for-help' ('C-h C-h') screen has been redesigned.
(define-key map "\r" 'help-follow)
(define-key map "s" 'help-view-source)
(define-key map "i" 'help-goto-info)
+ (define-key map "c" 'help-customize)
map)
"Keymap for Help mode.")
["Move to Previous Button" backward-button
:help "Move to the Previous Button in the help buffer"]
["Move to Next Button" forward-button
- :help "Move to the Next Button in the help buffer"]
+ :help "Move to the Next Button in the help buffer"]
["View Source" help-view-source
:help "Go to the source file for the current help item"]
["Goto Info" help-goto-info
- :help "Go to the info node for the current help item"]))
+ :help "Go to the info node for the current help item"]
+ ["Customize" help-customize
+ :help "Customize variable or face"]))
(defvar help-mode-tool-bar-map
(let ((map (make-sparse-keymap)))
(info-lookup-symbol (plist-get help-mode--current-data :symbol)
'emacs-lisp-mode))
+(defun help-customize ()
+ "Customize variable or face."
+ (interactive nil help-mode)
+ (let ((sym (plist-get help-mode--current-data :symbol)))
+ (unless (or (boundp sym) (facep sym))
+ (user-error "No variable or face to customize"))
+ (cond
+ ((boundp sym) (customize-variable sym))
+ ((facep sym) (customize-face sym)))))
+
(defun help-do-xref (_pos function args)
"Call the help cross-reference function FUNCTION with args ARGS.
Things are set up properly so that the resulting help-buffer has