]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/help-fns.el (describe-variable):
authorGlenn Morris <rgm@gnu.org>
Sat, 8 Feb 2014 02:55:04 +0000 (21:55 -0500)
committerGlenn Morris <rgm@gnu.org>
Sat, 8 Feb 2014 02:55:04 +0000 (21:55 -0500)
Check {file,dir}-local-variables-alist, and buffer-file-name,
in the correct buffer.

This seems to have Just Worked in 24.3 - when and why did it change?

lisp/ChangeLog
lisp/help-fns.el

index 0369e5ed07527e708b716457ae0575ba9228b0bb..6890915509fb51f44fb19b38cc329b2e839fd0f0 100644 (file)
@@ -1,3 +1,9 @@
+2014-02-08  Glenn Morris  <rgm@gnu.org>
+
+       * help-fns.el (describe-variable):
+       Check {file,dir}-local-variables-alist, and buffer-file-name,
+       in the correct buffer.
+
 2014-02-08  Ingo Lohmar  <i.lohmar@gmail.com>
 
        * help-fns.el (describe-variable): Fix the case where
index 028f6ac0c309d408b338a80cd4a9c7f30bfc1255..44dcbb955ac0209a6e60238c90eeaac5179e2c2c 100644 (file)
@@ -911,13 +911,18 @@ if it is given a local binding.\n")))
                             (t ".")))
                 (terpri))
 
-             (when (member (cons variable val) file-local-variables-alist)
+             (when (member (cons variable val)
+                            (with-current-buffer buffer
+                              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)))
+               (if (member (cons variable val)
+                             (with-current-buffer buffer
+                               dir-local-variables-alist))
+                   (let ((file (and (buffer-file-name buffer)
+                                      (not (file-remote-p
+                                            (buffer-file-name buffer)))
                                       (dir-locals-find-file
-                                       (buffer-file-name))))
+                                       (buffer-file-name buffer))))
                           (dir-file t))
                      (princ "  This variable's value is directory-local")
                      (if (null file)