aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-05-25 18:39:16 +0000
committerRichard M. Stallman1998-05-25 18:39:16 +0000
commit7e824765ca6a3c3d3fb3b9bcf17fc74cc07df8b4 (patch)
tree35ab40102e736d59276f07a807196c2277deed75
parent0bea75b9d4b7771f59de550a02843db588e1c9bc (diff)
downloademacs-7e824765ca6a3c3d3fb3b9bcf17fc74cc07df8b4.tar.gz
emacs-7e824765ca6a3c3d3fb3b9bcf17fc74cc07df8b4.zip
(describe-variable): Add a button to call
customize-variable if the variable can be customized.
-rw-r--r--lisp/help.el16
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."
733 (let ((doc (documentation-property variable 'variable-documentation))) 733 (let ((doc (documentation-property variable 'variable-documentation)))
734 (princ (or doc "not documented as a variable."))) 734 (princ (or doc "not documented as a variable.")))
735 (help-setup-xref (cons #'describe-variable variable) (interactive-p)) 735 (help-setup-xref (cons #'describe-variable variable) (interactive-p))
736
737 ;; Make a link to customize if this variable can be customized.
738 (if (or (get variable 'custom-type)
739 (user-variable-p variable))
740 (let ((customize-label "customize"))
741 (terpri)
742 (terpri)
743 (princ (concat "You can " customize-label " this variable."))
744 (with-current-buffer "*Help*"
745 (save-excursion
746 (re-search-backward
747 (concat "\\(" customize-label "\\)") nil t)
748 (help-xref-button 1 #'(lambda (v)
749 (customize-variable v)) variable)
750 ))))
751
736 (print-help-return-message) 752 (print-help-return-message)
737 (save-excursion 753 (save-excursion
738 (set-buffer standard-output) 754 (set-buffer standard-output)