aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2009-07-19 16:56:22 +0000
committerJuri Linkov2009-07-19 16:56:22 +0000
commit2ee20f24e8b7ed14bdb77c8b6f2ee12638f90a9d (patch)
tree4b6edeb9a019f61f3d382541ff8d735b8c591d24
parent8c8b01853d8733bbbfccaa52c4b45bb97d42e6ba (diff)
downloademacs-2ee20f24e8b7ed14bdb77c8b6f2ee12638f90a9d.tar.gz
emacs-2ee20f24e8b7ed14bdb77c8b6f2ee12638f90a9d.zip
(describe-variable): Add information about file-local and dir-local variables.
-rw-r--r--lisp/ChangeLog15
-rw-r--r--lisp/help-fns.el12
2 files changed, 27 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2d5465a3d4f..042217c637e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,18 @@
12009-07-19 Juri Linkov <juri@jurta.org>
2
3 * files.el (ignored-local-variables): Add `dir-local-variables-alist'.
4 (dir-local-variables-alist): New buffer-local variable.
5 (hack-local-variables-filter): If variable is not dir-local,
6 i.e. `dir-name' is nil, then remove it from `dir-local-variables-alist',
7 because file-local overrides dir-local.
8 (c-postprocess-file-styles)<declare-function>:
9 Remove obsolete declaration.
10 (hack-dir-local-variables): Add dir-local variable/value pair to
11 `dir-local-variables-alist' and remove duplicates. Doc fix.
12
13 * help-fns.el (describe-variable): Add information about
14 file-local and dir-local variables.
15
12009-07-19 Chong Yidong <cyd@stupidchicken.com> 162009-07-19 Chong Yidong <cyd@stupidchicken.com>
2 17
3 * files.el (hack-local-variables-filter): Rewrite. 18 * files.el (hack-local-variables-filter): Rewrite.
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index cbc140255e0..d45976cc8dc 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -710,6 +710,18 @@ it is displayed along with the global value."
710 (use (format ";\n use `%s' instead." (car obsolete))) 710 (use (format ";\n use `%s' instead." (car obsolete)))
711 (t "."))) 711 (t ".")))
712 (terpri)) 712 (terpri))
713
714 (when (member (cons variable val) file-local-variables-alist)
715 (setq extra-line t)
716 (if (member (cons variable val) dir-local-variables-alist)
717 (let ((file (and (buffer-file-name)
718 (not (file-remote-p (buffer-file-name)))
719 (dir-locals-find-file (buffer-file-name)))))
720 (princ " This variable is a directory local variable")
721 (if file (princ (concat "\n from the file \"" file "\"")))
722 (princ ".\n"))
723 (princ " This variable is a file local variable.\n")))
724
713 (when safe-var 725 (when safe-var
714 (setq extra-line t) 726 (setq extra-line t)
715 (princ " This variable is safe as a file local variable ") 727 (princ " This variable is safe as a file local variable ")