Subject: bug#41065: (no subject)

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 27 Oct 2020 09:47:07 +0100

Paul Pogonyshev <[email-masked]> writes:

> Subject: [PATCH] Don't leak result of nested byte-compilation to outer level
>  (bug#41065)

[...]

> +	byte-compile-dest-file byte-compiler-error-flag)
>      (setq target-file (byte-compile-dest-file filename))
>      (setq byte-compile-dest-file target-file)
>      (with-current-buffer
> @@ -2000,7 +2000,6 @@ byte-compile-file
>  	  'no-byte-compile)
>        (when byte-compile-verbose
>  	(message "Compiling %s..." filename))
> -      (setq byte-compiler-error-flag nil)

Thanks; applied to Emacs 28.  I tried to follow the code paths where
this variable is used, and as far as I can tell, this should be safe.

The old code was rather odd, because there's just a

(defvar byte-compiler-error-flag)

in the file -- it's not actually defined, but after compiling something,
that `setq' would define it globally.  So your patch fixes that problem,
too.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no