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

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

bug#29679: 26.0.90; :after-hook not compiled


From: Eli Zaretskii
Subject: bug#29679: 26.0.90; :after-hook not compiled
Date: Fri, 15 Dec 2017 12:34:11 +0200

> From: Stefan Monnier <address@hidden>
> Date: Tue, 12 Dec 2017 15:07:24 -0500
> Cc: Alan Mackenzie <address@hidden>
> 
> I just realized that the :after-hook option of define-derived-mode (new
> in Emacs-26) is expanded in a way that introduces some problems.
> More specifically a
> 
>    :after-hook (foo bar)
> 
> gets turned into something like
> 
>    (push '(foo bar) 'delayed-after-hook-forms)
> 
> which means that the code (foo bar) is not byte-compiled, hence is not
> macro-expanded, and will be evaluated later via `eval` without paying
> attention to the setting of `lexical-binding`.
> 
> It's not a very serious problem in practice, but if we keep the code as
> we have it, it means that code byte-compiled with Emacs-26 will use the
> above
> 
>    (push '(foo bar) 'delayed-after-hook-forms)
> 
> in its .elc and we'll have to preserve backward compatibility with it.
> So it'd be better to fix it before Emacs-26 is released.
> Here's a minimal patch for it, which I hope is safe enough for emacs-26.
> 
> OK to push to emacs-26?

LGTM, thanks.  Alan, do you agree?





reply via email to

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