diff options
author | Richard M. Stallman <rms@gnu.org> | 1998-05-25 18:39:16 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1998-05-25 18:39:16 +0000 |
commit | 7e824765ca6a3c3d3fb3b9bcf17fc74cc07df8b4 (patch) | |
tree | 35ab40102e736d59276f07a807196c2277deed75 /lisp | |
parent | 0bea75b9d4b7771f59de550a02843db588e1c9bc (diff) | |
download | emacs-7e824765ca6a3c3d3fb3b9bcf17fc74cc07df8b4.tar.gz |
(describe-variable): Add a button to call
customize-variable if the variable can be customized.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/help.el | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lisp/help.el b/lisp/help.el index 4357963baa5..1c15f4f87e4 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -733,6 +733,22 @@ Returns the documentation as a string, also." (let ((doc (documentation-property variable 'variable-documentation))) (princ (or doc "not documented as a variable."))) (help-setup-xref (cons #'describe-variable variable) (interactive-p)) + + ;; Make a link to customize if this variable can be customized. + (if (or (get variable 'custom-type) + (user-variable-p variable)) + (let ((customize-label "customize")) + (terpri) + (terpri) + (princ (concat "You can " customize-label " this variable.")) + (with-current-buffer "*Help*" + (save-excursion + (re-search-backward + (concat "\\(" customize-label "\\)") nil t) + (help-xref-button 1 #'(lambda (v) + (customize-variable v)) variable) + )))) + (print-help-return-message) (save-excursion (set-buffer standard-output) |