changeset 22234:40229c79e16b

(describe-variable): Add a button to call customize-variable if the variable can be customized.
author Richard M. Stallman <rms@gnu.org>
date Mon, 25 May 1998 18:39:16 +0000
parents d06567759809
children ee90e9da3a70
files lisp/help.el
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)