comparison lisp/help-fns.el @ 46312:160a65e0fb1f

(describe-variable): Mention if the variable is an alias.
author Pavel Janík <Pavel@Janik.cz>
date Fri, 12 Jul 2002 08:56:12 +0000
parents 860693575c7d
children 1d8304aae3cc
comparison
equal deleted inserted replaced
46311:f0ce459aa276 46312:160a65e0fb1f
436 (princ (if (stringp (car obsolete)) (car obsolete) 436 (princ (if (stringp (car obsolete)) (car obsolete)
437 (format "use `%s' instead." (car obsolete)))) 437 (format "use `%s' instead." (car obsolete))))
438 (terpri))) 438 (terpri)))
439 (let ((doc (documentation-property variable 'variable-documentation))) 439 (let ((doc (documentation-property variable 'variable-documentation)))
440 (princ (or doc "Not documented as a variable."))) 440 (princ (or doc "Not documented as a variable.")))
441 441
442 ;; Mention if the variable is an alias.
443 (let ((alias (condition-case nil
444 (indirect-variable variable)
445 (error variable))))
446 (unless (eq alias variable)
447 (terpri)
448 (terpri)
449 (princ (format "This variable is an alias for `%s'." alias))))
450
442 ;; Make a link to customize if this variable can be customized. 451 ;; Make a link to customize if this variable can be customized.
443 ;; Note, it is not reliable to test only for a custom-type property 452 ;; Note, it is not reliable to test only for a custom-type property
444 ;; because those are only present after the var's definition 453 ;; because those are only present after the var's definition
445 ;; has been loaded. 454 ;; has been loaded.
446 (if (or (get variable 'custom-type) ; after defcustom 455 (if (or (get variable 'custom-type) ; after defcustom