aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-02-01 09:29:40 +0000
committerRichard M. Stallman1995-02-01 09:29:40 +0000
commit3e483e0134beb8d47e0acd7b7449575807971ce3 (patch)
tree7095b36364341210c8728ebbda3073199642ce1b
parent92bde7a2279f1fdb8944d83b0efdbb92f7c32afb (diff)
downloademacs-3e483e0134beb8d47e0acd7b7449575807971ce3.tar.gz
emacs-3e483e0134beb8d47e0acd7b7449575807971ce3.zip
(describe-variable): If var is local, mention default.
-rw-r--r--lisp/help.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 2ad91584132..fb4815408e0 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -499,13 +499,19 @@ Returns the documentation as a string, also."
499 v (intern val))))) 499 v (intern val)))))
500 (with-output-to-temp-buffer "*Help*" 500 (with-output-to-temp-buffer "*Help*"
501 (prin1 variable) 501 (prin1 variable)
502 (princ "'s value is ")
503 (if (not (boundp variable)) 502 (if (not (boundp variable))
504 (princ "void.") 503 (princ " is void")
504 (princ "'s value is ")
505 (prin1 (symbol-value variable))) 505 (prin1 (symbol-value variable)))
506 (terpri) 506 (terpri)
507 (if (local-variable-p variable) 507 (if (local-variable-p variable)
508 (princ (format "Local in buffer %s\n" (buffer-name)))) 508 (progn
509 (princ (format "Local in buffer %s; " (buffer-name)))
510 (if (not (default-boundp variable))
511 (princ "globally void")
512 (princ "global value is ")
513 (prin1 (default-value variable)))
514 (terpri)))
509 (terpri) 515 (terpri)
510 (princ "Documentation:") 516 (princ "Documentation:")
511 (terpri) 517 (terpri)