1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-11 16:08:13 +00:00

(describe-variable): Report whether var is local in this buf.

This commit is contained in:
Richard M. Stallman 1994-09-17 07:30:42 +00:00
parent 5afc7fb0ba
commit 7e76ae2395

View File

@ -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)))