Subject: bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables

From: LdBeth <[email-masked]>
Date: Sat, 24 Jun 2023 21:11:11 -0500

>>>>> In <[email-masked]> 
>>>>>	Eli Zaretskii <[email-masked]> 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