]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix warning message in hack-local-variables
authorNoam Postavsky <npostavs@gmail.com>
Wed, 3 Feb 2016 17:48:45 +0000 (19:48 +0200)
committerEli Zaretskii <eliz@gnu.org>
Wed, 3 Feb 2016 17:48:45 +0000 (19:48 +0200)
* lisp/files.el (hack-local-variables): use 'thisbuf' to reference
the original buffer name in the warning message.  (Bug#21681)

lisp/files.el

index 3898dff03838bfc89bf089e25d32e2a6bd1db35d..72c2752634ec084c8568eb4c7f9e1a0fdeaf38bc 100644 (file)
@@ -3426,7 +3426,11 @@ local variables, but directory-local variables may still be applied."
                                   (format-message
                                    "%s: `lexical-binding' at end of file unreliable"
                                    (file-name-nondirectory
-                                    (or buffer-file-name ""))))))
+                                    ;; We are called from
+                                    ;; 'with-temp-buffer', so we need
+                                    ;; to use 'thisbuf's name in the
+                                    ;; warning message.
+                                    (or (buffer-file-name thisbuf) ""))))))
                              (t
                               (ignore-errors
                                 (push (cons (if (eq var 'eval)