bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#54240: emacs/lisp/emacs-lisp/derived.el patch


From: Michael Heerdegen
Subject: bug#54240: emacs/lisp/emacs-lisp/derived.el patch
Date: Fri, 04 Mar 2022 22:39:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Oh, yeah -- I was thinking that the mode had to be lexically bound
> there, but of course it isn't really, since eval is ... eval.  (Whenever
> there's an eval in code, there's a bug somewhere.)

`defvar' doesn't eval the first argument, and there is no alternative to
using it (right?).  So `derived-mode-init-mode-variables' should just
better be a macro I think.

> Would adding LEXICAL to the eval form fix the issue here, or would that
> interact oddly with the defvar?

Yes - since `defvar' doesn't evaluate its first argument no variable
references will work.  The constructed sexp must contain the final
symbol at that position, any other expression won't do it.

Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]