(describe-variable): Add information about file-local and dir-local variables.

This commit is contained in:
Juri Linkov 2009-07-19 16:56:22 +00:00
parent 8c8b01853d
commit 2ee20f24e8
2 changed files with 27 additions and 0 deletions

View file

@ -710,6 +710,18 @@ it is displayed along with the global value."
(use (format ";\n use `%s' instead." (car obsolete)))
(t ".")))
(terpri))
(when (member (cons variable val) file-local-variables-alist)
(setq extra-line t)
(if (member (cons variable val) dir-local-variables-alist)
(let ((file (and (buffer-file-name)
(not (file-remote-p (buffer-file-name)))
(dir-locals-find-file (buffer-file-name)))))
(princ " This variable is a directory local variable")
(if file (princ (concat "\n from the file \"" file "\"")))
(princ ".\n"))
(princ " This variable is a file local variable.\n")))
(when safe-var
(setq extra-line t)
(princ " This variable is safe as a file local variable ")