Subject: bug#23495: byte-compile-file return t when there is "XXX can't use lexical var" error

From: Michael Heerdegen <[email-masked]>
Date: Wed, 11 May 2016 18:25:40 +0200

Yuta Yamada <[email-masked]> writes:

> (defun byte-compile-log-warning (string &optional fill level)
>   (let ((warning-prefix-function 'byte-compile-warning-prefix)
> 	(warning-type-format "")
> 	(warning-fill-prefix (if fill "    ")))
>     (display-warning 'bytecomp string level byte-compile-log-buffer)
>     ;; I added below code
>     ;; the `byte-compiler-error-flag' changes final result of
>     ;; byte-compile-file.
>     (when (or byte-compile-error-on-warn (eq level :error))
>       (setq byte-compiler-error-flag t))))

Dunno if something like that what would be accepted.  OTOH, if the
behavior could be controlled by a user option, it would not harm.

I leave it to somebody else to decide that.

Michael.