From: Glenn Morris Date: Sat, 8 Feb 2014 02:55:04 +0000 (-0500) Subject: * lisp/help-fns.el (describe-variable): X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~121 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dd8e49fda275d10b7c62c18be022f7d27f67ddb6;p=emacs.git * lisp/help-fns.el (describe-variable): 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? --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0369e5ed075..6890915509f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-02-08 Glenn Morris + + * help-fns.el (describe-variable): + Check {file,dir}-local-variables-alist, and buffer-file-name, + in the correct buffer. + 2014-02-08 Ingo Lohmar * help-fns.el (describe-variable): Fix the case where diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 028f6ac0c30..44dcbb955ac 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -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)