From: Eli Zaretskii <eliz@gnu.org>
To: Matthew Fidler <matthew.fidler@gmail.com>
Cc: 18014@debbugs.gnu.org
Subject: bug#18014: 24.3; Unused Lexical argument warning, when argument is used in a function...
Date: Tue, 15 Jul 2014 17:18:53 +0300 [thread overview]
Message-ID: <83iomy9036.fsf@gnu.org> (raw)
In-Reply-To: <CAOmN8O4CKA+FGwv1S4AMz8Wb=jfDcAZAMB2w_BzErMPNGx7UGg@mail.gmail.com>
> Date: Mon, 14 Jul 2014 14:46:04 -0500
> From: Matthew Fidler <matthew.fidler@gmail.com>
> Cc: 18014@debbugs.gnu.org
>
> 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*
The line number in this warning is a lie: the problem is in the lambda
function:
(lambda(key plist)
(setq ret (ergoemacs-translation-install plist orig-key ret)))
which does leave its 'key' argument unused. (If you rename this
argument to something else, leaving the rest of ergoemacs-translate
with the original 'key', the warning will reference the new name.)
> 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.
The last observation doesn't match what I see here: when I compile
bug.el with the current trunk, Emacs issues the warning, not error,
message, and exits with exit code of zero. Which matches what I see
in the code: the warning about unused lexical argument is issued (in
cconv.el) by calling byte-compile-log-warning, which bypasses the
machinery that converts byte-compile warnings to errors; not sure if
this is on purpose or not.
So if you see something different, there's some other factor(s) at
work here.
In any case, this is a separate issue, which probably warrants a
separate report.
next prev parent reply other threads:[~2014-07-15 14:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 12:25 bug#18014: 24.3; Unused Lexical argument warning, when argument is used in a function Matthew Fidler
2014-07-14 12:28 ` Matthew Fidler
2014-07-14 14:47 ` Eli Zaretskii
[not found] ` <CAOmN8O5ROfi5W44fBJe=sUs28TR1CDVQ2hWZoU0D4BTOGmKESg@mail.gmail.com>
2014-07-14 14:58 ` bug#18014: Fwd: " Matthew Fidler
2014-07-14 15:30 ` Eli Zaretskii
2014-07-14 15:46 ` Matthew Fidler
2014-07-14 15:47 ` Matthew Fidler
2014-07-14 16:01 ` Matthew Fidler
2014-07-14 16:18 ` Eli Zaretskii
2014-07-14 19:46 ` Matthew Fidler
2014-07-15 14:18 ` Eli Zaretskii [this message]
2014-07-14 16:17 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83iomy9036.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=18014@debbugs.gnu.org \
--cc=matthew.fidler@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).