Mercurial > emacs
comparison lisp/help.el @ 37859:5c792c525a42
(describe-variable): Deal with variable aliases.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 21 May 2001 12:39:41 +0000 |
parents | cbc7ca823734 |
children |
comparison
equal
deleted
inserted
replaced
37858:fd7c0dac2110 | 37859:5c792c525a42 |
---|---|
839 "Describe variable: ") | 839 "Describe variable: ") |
840 obarray 'boundp t nil nil | 840 obarray 'boundp t nil nil |
841 (if (symbolp v) (symbol-name v)))) | 841 (if (symbolp v) (symbol-name v)))) |
842 (list (if (equal val "") | 842 (list (if (equal val "") |
843 v (intern val))))) | 843 v (intern val))))) |
844 (unless (bufferp buffer) (setq buffer (current-buffer))) | 844 (unless (bufferp buffer) |
845 (setq buffer (current-buffer))) | |
845 (if (not (symbolp variable)) | 846 (if (not (symbolp variable)) |
846 (message "You did not specify a variable") | 847 (message "You did not specify a variable") |
847 (let (valvoid) | 848 (let (valvoid) |
848 (with-current-buffer buffer | 849 (with-current-buffer buffer |
849 (with-output-to-temp-buffer "*Help*" | 850 (with-output-to-temp-buffer "*Help*" |
851 | |
852 (let ((aliased (indirect-variable variable))) | |
853 (unless (eq aliased variable) | |
854 (princ (format "%s is a variable alias for %s.\n\n" | |
855 variable aliased)) | |
856 (setq variable aliased))) | |
857 | |
850 (prin1 variable) | 858 (prin1 variable) |
851 (if (not (boundp variable)) | 859 (if (not (boundp variable)) |
852 (progn | 860 (progn |
853 (princ " is void") | 861 (princ " is void") |
854 (setq valvoid t)) | 862 (setq valvoid t)) |