changeset 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 f0ce459aa276
children 5147af5ee4b8
files lisp/help-fns.el
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help-fns.el	Fri Jul 12 03:38:12 2002 +0000
+++ b/lisp/help-fns.el	Fri Jul 12 08:56:12 2002 +0000
@@ -438,7 +438,16 @@
 		(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