Subject: bug#55811: 29.0.50; No flymake diagnostics for no-byte-compile files

From: Stefan Monnier <[email-masked]>
Date: Tue, 21 Jan 2025 06:01:28 -0500

> 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