Commit 7e824765 authored by Richard M. Stallman's avatar Richard M. Stallman

(describe-variable): Add a button to call

customize-variable if the variable can be customized.
parent 0bea75b9
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment