From: Richard M. Stallman Date: Sat, 17 Sep 1994 07:30:42 +0000 (+0000) Subject: (describe-variable): Report whether var is local in this buf. X-Git-Tag: emacs-19.34~6996 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7e76ae2395e75949c865ac0c7cfde7e1b0b70532;p=emacs.git (describe-variable): Report whether var is local in this buf. --- diff --git a/lisp/help.el b/lisp/help.el index 308574cca5c..80cbdcea6f6 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -456,7 +456,17 @@ Returns the documentation as a string, also." (if (not (boundp variable)) (princ "void.") (prin1 (symbol-value variable))) - (terpri) (terpri) + (terpri) + (let ((locals (buffer-local-variables)) + is-local) + (while locals + (if (or (eq variable (car locals)) + (eq variable (car-safe (car locals)))) + (setq is-local t locals nil)) + (setq locals (cdr locals))) + (if is-local + (princ (format "Local in buffer %s\n" (buffer-name))))) + (terpri) (princ "Documentation:") (terpri) (let ((doc (documentation-property variable 'variable-documentation)))