changeset 37859:5c792c525a42

(describe-variable): Deal with variable aliases.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 21 May 2001 12:39:41 +0000
parents fd7c0dac2110
children fc297b7bb8bb
files lisp/help.el
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help.el	Mon May 21 12:34:11 2001 +0000
+++ b/lisp/help.el	Mon May 21 12:39:41 2001 +0000
@@ -841,12 +841,20 @@
 				(if (symbolp v) (symbol-name v))))
      (list (if (equal val "")
 	       v (intern val)))))
-  (unless (bufferp buffer) (setq buffer (current-buffer)))
+  (unless (bufferp buffer) 
+    (setq buffer (current-buffer)))
   (if (not (symbolp variable))
       (message "You did not specify a variable")
     (let (valvoid)
       (with-current-buffer buffer
 	(with-output-to-temp-buffer "*Help*"
+
+	  (let ((aliased (indirect-variable variable)))
+	    (unless (eq aliased variable)
+	      (princ (format "%s is a variable alias for %s.\n\n"
+			     variable aliased))
+	      (setq variable aliased)))
+
 	  (prin1 variable)
 	  (if (not (boundp variable))
 	      (progn