Easy enough. Put these in a directory, say ~/emacs-bug-1801 and run the following command:
emacs -Q --batch -L . --eval \
"(progn \
(setq byte-compile-error-on-warn t) \
(batch-byte-compile))" *.el
On Emacs 24.3 the following warning will occur:
In toplevel form:
bug.el:10:1:Warning: Unused lexical argument `key' <<--- Incorrect; key is a used lexical argument
Wrote e:/EmacsPortable.App/Data/src/ergoemacs-mode/bug.elc
In toplevel form:
bug2.el:10:1:Warning: argument `_key' not left unused <<--- Correct; _key is a used lexical argument
Wrote e:/EmacsPortable.App/Data/src/ergoemacs-mode/bug2.elc
Also on emacs 24.3, even though batch-byte-compile-error-on-warn is set to t, it will ignore the errors, which is not what I expect when I set this option.
On Emacs trunk (24.4) it will not ignore the error but cause the make to fail.
Matt
Type the following