]> git.eshelyaron.com Git - emacs.git/commitdiff
(describe-variable): Add information about file-local and dir-local variables.
authorJuri Linkov <juri@jurta.org>
Sun, 19 Jul 2009 16:56:22 +0000 (16:56 +0000)
committerJuri Linkov <juri@jurta.org>
Sun, 19 Jul 2009 16:56:22 +0000 (16:56 +0000)
lisp/ChangeLog
lisp/help-fns.el

index 2d5465a3d4ff5da9652e19a2c244519a2e0f9592..042217c637efde8071efafa9e6d0f08ca6dfb494 100644 (file)
@@ -1,3 +1,18 @@
+2009-07-19  Juri Linkov  <juri@jurta.org>
+
+       * files.el (ignored-local-variables): Add `dir-local-variables-alist'.
+       (dir-local-variables-alist): New buffer-local variable.
+       (hack-local-variables-filter): If variable is not dir-local,
+       i.e. `dir-name' is nil, then remove it from `dir-local-variables-alist',
+       because file-local overrides dir-local.
+       (c-postprocess-file-styles)<declare-function>:
+       Remove obsolete declaration.
+       (hack-dir-local-variables): Add dir-local variable/value pair to
+       `dir-local-variables-alist' and remove duplicates.  Doc fix.
+
+       * help-fns.el (describe-variable): Add information about
+       file-local and dir-local variables.
+
 2009-07-19  Chong Yidong  <cyd@stupidchicken.com>
 
        * files.el (hack-local-variables-filter): Rewrite.
index cbc140255e028bb75d33c34d7bdc584745876bce..d45976cc8dc33434420ac11c0b9d1f13d0116fbb 100644 (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 ")