]> code.delx.au - gnu-emacs/blobdiff - lisp/files.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / files.el
index 92ae4344e1c96ccd3803e4e04cd1f9f7b8414457..aca7b3593d973caa137db78fa258b1ab54cad207 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)