(describe-variable): If var is local, mention default.

This commit is contained in:
Richard M. Stallman 1995-02-01 09:29:40 +00:00
parent 92bde7a227
commit 3e483e0134

View file

@ -499,13 +499,19 @@ Returns the documentation as a string, also."
v (intern val)))))
(with-output-to-temp-buffer "*Help*"
(prin1 variable)
(princ "'s value is ")
(if (not (boundp variable))
(princ "void.")
(princ " is void")
(princ "'s value is ")
(prin1 (symbol-value variable)))
(terpri)
(if (local-variable-p variable)
(princ (format "Local in buffer %s\n" (buffer-name))))
(progn
(princ (format "Local in buffer %s; " (buffer-name)))
(if (not (default-boundp variable))
(princ "globally void")
(princ "global value is ")
(prin1 (default-value variable)))
(terpri)))
(terpri)
(princ "Documentation:")
(terpri)