# HG changeset patch # User Richard M. Stallman # Date 896121556 0 # Node ID 40229c79e16b0e29e8e7ce649e4249e1767c3e22 # Parent d065677598093e093dc11ae6e1fdc8af699b65e8 (describe-variable): Add a button to call customize-variable if the variable can be customized. diff -r d06567759809 -r 40229c79e16b lisp/help.el --- a/lisp/help.el Mon May 25 18:37:10 1998 +0000 +++ b/lisp/help.el Mon May 25 18:39:16 1998 +0000 @@ -733,6 +733,22 @@ (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)