From 9327f1343966a9131fa8f8561f8dad0be03bbd39 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pavel=20Jan=C3=ADk?= Date: Fri, 12 Jul 2002 08:58:32 +0000 Subject: [PATCH] (describe-variable): Mention if the variable is an alias. --- lisp/ChangeLog | 5 +++++ lisp/help-fns.el | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 106896ddb2c..d53059efb6b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-07-12 John Paul Wallington + + * help-fns.el (describe-variable): Mention if the variable is an + alias. + 2002-07-12 Kenichi Handa * international/mule-cmds.el (locale-language-names): Change "mk" diff --git a/lisp/help-fns.el b/lisp/help-fns.el index f62443ef152..d4daa2fa11c 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -438,7 +438,16 @@ it is displayed along with the global value." (terpri))) (let ((doc (documentation-property variable 'variable-documentation))) (princ (or doc "Not documented as a variable."))) - + + ;; Mention if the variable is an alias. + (let ((alias (condition-case nil + (indirect-variable variable) + (error variable)))) + (unless (eq alias variable) + (terpri) + (terpri) + (princ (format "This variable is an alias for `%s'." alias)))) + ;; Make a link to customize if this variable can be customized. ;; Note, it is not reliable to test only for a custom-type property ;; because those are only present after the var's definition -- 2.39.5