Mercurial > emacs
changeset 103983:4af91568dcc6
(describe-variable): Add information about file-local and dir-local variables.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Sun, 19 Jul 2009 16:56:05 +0000 |
parents | bffadf81bdd5 |
children | 43559a8aeabb |
files | lisp/help-fns.el |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/help-fns.el Sun Jul 19 16:55:16 2009 +0000 +++ b/lisp/help-fns.el Sun Jul 19 16:56:05 2009 +0000 @@ -710,6 +710,18 @@ (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 ")