From 3c3c1bd1d5672930b95d9ac00ba7e48636b7ff7f Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Tue, 13 Oct 2015 18:29:56 -0400 Subject: [PATCH] Fix formatting of lexical-binding at eof warning * lisp/files.el (hack-local-variables): Get buffer name from the visiting buffer, and pass 'files as first arg to `display-warning'. --- lisp/files.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 8565aa8..d979a42 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3418,11 +3418,11 @@ (defun hack-local-variables (&optional mode-only) (unless hack-local-variables--warned-lexical (setq hack-local-variables--warned-lexical t) (display-warning - :warning + 'files (format-message "%s: `lexical-binding' at end of file unreliable" (file-name-nondirectory - (or buffer-file-name "")))))) + (or (buffer-file-name thisbuf) "")))))) (t (ignore-errors (push (cons (if (eq var 'eval) -- 2.5.3