comparison lisp/help-fns.el @ 93573:553dfbccecfa

(describe-variable): Undo 2008-02-25 change.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 03 Apr 2008 04:01:32 +0000
parents 5fc9c77f2aea
children ee5932bf781d
comparison
equal deleted inserted replaced
93572:6c6edc54b63a 93573:553dfbccecfa
677 (if extra-line (terpri)) 677 (if extra-line (terpri))
678 (princ "Documentation:\n") 678 (princ "Documentation:\n")
679 (with-current-buffer standard-output 679 (with-current-buffer standard-output
680 (insert (or doc "Not documented as a variable.")))) 680 (insert (or doc "Not documented as a variable."))))
681 681
682 (let ((customize-label "customize") 682 ;; Make a link to customize if this variable can be customized.
683 (initialization-file "initialization file")) 683 (when (custom-variable-p variable)
684 ;; All variables can be set; some can be customized 684 (let ((customize-label "customize"))
685 (when (and (symbolp variable) (not (custom-variable-p variable)))
686 (terpri) 685 (terpri)
687 (terpri) 686 (terpri)
688 (princ (concat "You can set this variable in your " 687 (princ (concat "You can " customize-label " this variable."))
689 initialization-file "."))
690 (with-current-buffer standard-output
691 (save-excursion
692 (re-search-backward
693 (concat "\\(" initialization-file "\\)") nil t)
694 (help-xref-button 1 'help-info-variable variable
695 "(emacs)Init File"))))
696 ;; Make a link to customize if this variable can be customized.
697 (when (custom-variable-p variable)
698 (terpri)
699 (terpri)
700 (princ (concat "You can " customize-label " this variable"))
701 (princ (concat " or set it in your " initialization-file "."))
702 (with-current-buffer standard-output 688 (with-current-buffer standard-output
703 (save-excursion 689 (save-excursion
704 (re-search-backward 690 (re-search-backward
705 (concat "\\(" customize-label "\\)") nil t) 691 (concat "\\(" customize-label "\\)") nil t)
706 (help-xref-button 1 'help-customize-variable variable)) 692 (help-xref-button 1 'help-customize-variable variable))))
707 (save-excursion
708 (re-search-backward
709 (concat "\\(" initialization-file "\\)") nil t)
710 (help-xref-button 1 'help-info-variable variable
711 "(emacs)Init File")
712 )
713 ))
714 ;; Note variable's version or package version 693 ;; Note variable's version or package version
715 (let ((output (describe-variable-custom-version-info variable))) 694 (let ((output (describe-variable-custom-version-info variable)))
716 (when output 695 (when output
717 (terpri) 696 (terpri)
718 (terpri) 697 (terpri)