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 #41 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>,
 monnier <at> iro.umontreal.ca
Subject: Re: bug#64272: 28.1;
 lisp_file_lexically_bound_p behavior mismatches file local variables
Date: Sun, 25 Jun 2023 19:45:14 -0500
>>>>> In <tencent_801CA17A56314C746AAC30FFB8DC58BB1109 <at> qq.com> 
>>>>>	LdBeth <andpuke <at> foxmail.com> wrote:

ldb> So as I continue digging into lread.c and trying to find alternative
ldb> solutions, I find these:

ldb>   DEFSYM (Qget_file_char, "get-file-char");

ldb>   /* Used instead of Qget_file_char while loading *.elc files compiled
ldb>      by Emacs 21 or older.  */
ldb>   DEFSYM (Qget_emacs_mule_file_char, "get-emacs-mule-file-char");

ldb> While `get-file-char` is exposed to emacs lisp,
ldb> `get-emacs-mule-file-char' is not even a defined lisp function.

ldb> There are multiple places in `lread.c` that handles
ldb> `Qget_emacs_mule_file_char`. Which I believe it time to consider
ldb> them as dead code and remove them.

Sorry, I misread on how `Qget_emacs_mule_file_char' is been used.
It is still been used internally in `lread.c' because of how READCHAR
works.

ldb> For the only two functions that calls `lisp_file_lexically_bound_p`,
ldb> `load` is hard coded to use `get-file-char` which is a wrapper around
ldb> `getc()`, and `eval-buffer` uses the `BUFFERP (readcharfun)`
ldb> branch in `readchar`. I think both case can be changed to
ldb> use a more flexible way to test file local variables
ldb> rather than stick to the READCHAR UNREAD api.

I think this still holds valid.

---
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.