GNU bug report logs - #64272
28.1; lisp_file_lexically_bound_p behavior mismatches file local variables

Previous Next

Package: emacs;

Reported by: LdBeth <andpuke <at> foxmail.com>

Date: Sat, 24 Jun 2023 18:24:02 UTC

Severity: normal

Tags: confirmed

Merged with 67321

Found in versions 28.1, 29.1.90

Full log


Message #14 received at 64272 <at> debbugs.gnu.org (full text, mbox):

From: LdBeth <andpuke <at> foxmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 64272 <at> debbugs.gnu.org, LdBeth <andpuke <at> foxmail.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#64272: 28.1;
 lisp_file_lexically_bound_p behavior mismatches file local variables
Date: Sat, 24 Jun 2023 21:11:11 -0500

>>>>> In <83zg4oy9ow.fsf <at> gnu.org> 
>>>>>	Eli Zaretskii <eliz <at> gnu.org> wrote:

ldb> This behavior is in contrast to how file local variables are applied
ldb> when opening a file, that is, as long as the variable list is in
ldb> the first line, it is applied.
ldb> 
ldb> Either the documentation should bring up this behavior, or the
ldb> C function `lisp_file_lexically_bound_p' in `src/lread.c' should be fixed.

Eli> I think we should do the latter, because
Eli> hack-local-variables-prop-line is more lenient than
Eli> lisp_file_lexically_bound_p.

Eli> Stefan, any comments?

If so, I think the only thing needs to be changed is
remove the `if (ch != ';')` test.

Since from what I test, even if first line is something like

|(setq tmp " -*- lexical-binding: t -*- ")

the file local variables would still be applied.

---
ldb





This bug report was last modified 1 year and 156 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.