unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21681: [PATCH] Fix formatting of lexical-binding at eof warning
@ 2015-10-13 22:51 Noam Postavsky
  2015-10-14 16:28 ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Noam Postavsky @ 2015-10-13 22:51 UTC (permalink / raw)
  To: 21681

[-- Attachment #1: Type: text/plain, Size: 168 bytes --]

Before:

Warning (:warning): : ‘lexical-binding’ at end of file unreliable

After:

Warning (files): foo.el: ‘lexical-binding’ at end of file unreliable

[-- Attachment #2: 0001-Fix-formatting-of-lexical-binding-at-eof-warning.patch --]
[-- Type: text/x-diff, Size: 1275 bytes --]

From 3c3c1bd1d5672930b95d9ac00ba7e48636b7ff7f Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@users.sourceforge.net>
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


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-02-03 17:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-13 22:51 bug#21681: [PATCH] Fix formatting of lexical-binding at eof warning Noam Postavsky
2015-10-14 16:28 ` Eli Zaretskii
2015-10-14 16:56   ` Noam Postavsky
2015-10-14 17:42     ` Eli Zaretskii
2015-10-14 17:47       ` Noam Postavsky
2015-10-14 17:53         ` Eli Zaretskii
2015-10-14 19:46           ` Eli Zaretskii
2015-10-15  2:30             ` Noam Postavsky
2015-10-31 22:36         ` Noam Postavsky
2016-01-24 18:43           ` Noam Postavsky
2016-01-24 18:51             ` Eli Zaretskii
2016-01-24 19:34               ` Noam Postavsky
2016-01-25 17:07                 ` Eli Zaretskii
2016-01-31 15:56                   ` Noam Postavsky
2016-02-03 17:49                     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).