From 7e76ae2395e75949c865ac0c7cfde7e1b0b70532 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 17 Sep 1994 07:30:42 +0000 Subject: [PATCH] (describe-variable): Report whether var is local in this buf. --- lisp/help.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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))) -- 2.39.5