From: Noam Postavsky Date: Wed, 3 Feb 2016 17:48:45 +0000 (+0200) Subject: Fix warning message in hack-local-variables X-Git-Tag: emacs-25.0.91~104 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2c0dc9fa70dcde56f68db6e72309f995e5c0e6e0;p=emacs.git Fix warning message in hack-local-variables * lisp/files.el (hack-local-variables): use 'thisbuf' to reference the original buffer name in the warning message. (Bug#21681) --- diff --git a/lisp/files.el b/lisp/files.el index 3898dff0383..72c2752634e 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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)