Indeed. I'd forgotten that the flymake byte compiler runs in a subprocess, rendering locals overrides in the calling process useless. That at least addresses flymake. Without a flag or bound variable to inform byte-compile-file to ignore no-byte-compile, elisp-byte-compile-buffer and elisp-byte-compile-file, which do run in process, fail silently. Would be great to adopt the simple flymake change in master, if not also in 30 (I can hear the hoots of "it's too late for 30" already). The patch is not really practical when using a packaged Emacs. In the meantime, I'll disable no-byte-compile. On Tue, Jan 21, 2025 at 6:01 AM Stefan Monnier wrote: > > OK. Try this "100% untested patch" (TM) then: > > > > diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el > > index 70826b4c3a..b99007c938 100644 > > --- a/lisp/progmodes/elisp-mode.el > > +++ b/lisp/progmodes/elisp-mode.el > > @@ -2152,7 +2152,9 @@ elisp-flymake--batch-compile-for-flymake > > collected) > > t))) > > (unwind-protect > > - (byte-compile-file file) > > + (progn > > + (setq-local no-byte-compile nil) > > + (byte-compile-file file)) > > (ignore-errors > > (kill-buffer byte-compile-log-buffer))) > > (prin1 :elisp-flymake-output-start) > > I didn't test it, but if this works, it looks good to me, > > > Stefan > >