From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 21681@debbugs.gnu.org
Subject: bug#21681: [PATCH] Fix formatting of lexical-binding at eof warning
Date: Sun, 31 Jan 2016 10:56:28 -0500 [thread overview]
Message-ID: <CAM-tV-_wfntO5ibNmB5QvvJ7pPZxX8PKgeCXrsQx5SUcnFrRdA@mail.gmail.com> (raw)
In-Reply-To: <838u3d37w1.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 456 bytes --]
On Mon, Jan 25, 2016 at 12:07 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Sun, 24 Jan 2016 14:34:31 -0500
>> From: Noam Postavsky <npostavs@users.sourceforge.net>
>>
>> [...] `display-warning' is
>> called from inside `with-temp-buffer`, so we need to use `thisbuf' to
>> reference the original buffer that we are calling
>> `hack-local-variables' for.
>
> Right, sorry. Yes, let's do that.
Ping? Resending with above explanation in commit message.
[-- Attachment #2: 0001-Fix-lexical-binding-at-eof-warning.patch --]
[-- Type: application/octet-stream, Size: 1125 bytes --]
From 1e9c294320b920f6f20daa49142de0173ed113c2 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sun, 24 Jan 2016 11:17:45 -0500
Subject: [PATCH] Fix lexical binding at eof warning
* files.el (hack-local-variables): `display-warning' is called from
inside `with-temp-buffer`, so we need to use `thisbuf' to reference the
original buffer that we are calling `hack-local-variables' for.
---
lisp/files.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/files.el b/lisp/files.el
index 3898dff..b2c90bc 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3426,7 +3426,7 @@ 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 ""))))))
+ (or (buffer-file-name thisbuf) ""))))))
(t
(ignore-errors
(push (cons (if (eq var 'eval)
--
2.6.2.windows.1
next prev parent reply other threads:[~2016-01-31 15:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2016-02-03 17:49 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAM-tV-_wfntO5ibNmB5QvvJ7pPZxX8PKgeCXrsQx5SUcnFrRdA@mail.gmail.com \
--to=npostavs@users.sourceforge.net \
--cc=21681@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).