* bug#21389: bogus diagnostic about unused lexical variable in eshell/time
@ 2015-08-31 21:36 Paul Eggert
2015-09-01 3:50 ` Stefan Monnier
2020-09-02 1:08 ` Stefan Kangas
0 siblings, 2 replies; 3+ messages in thread
From: Paul Eggert @ 2015-08-31 21:36 UTC (permalink / raw)
To: 21389
To reproduce the problem in a fresh build from Emacs master, do this:
touch lisp/eshell/em-unix.el
make
The output will include the following lines:
eshell/em-unix.el:933:1:Warning: Unused lexical variable ‘args’
eshell/em-unix.el:963:1:Warning: Unused lexical argument ‘args’
The first diagnostic is bogus. The second one is correct. Perhaps the
byte compiler is getting confused by the second one and the confusion is
affecting the first one.
The first diagnostic is generated for code that starts off like this:
(defun eshell/time (&rest args)
"Implementation of \"time\" in Lisp."
(let ((time-args (copy-alist args))
...
so the lexical variable ‘args’ is being used.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#21389: bogus diagnostic about unused lexical variable in eshell/time
2015-08-31 21:36 bug#21389: bogus diagnostic about unused lexical variable in eshell/time Paul Eggert
@ 2015-09-01 3:50 ` Stefan Monnier
2020-09-02 1:08 ` Stefan Kangas
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2015-09-01 3:50 UTC (permalink / raw)
To: Paul Eggert; +Cc: 21389
> so the lexical variable ‘args’ is being used.
The warning is about the `args' var introduced by the
eshell-eval-using-options macro, whose body looks like:
`(let* (...
(args processed-args))
,@body-forms))
-- Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#21389: bogus diagnostic about unused lexical variable in eshell/time
2015-08-31 21:36 bug#21389: bogus diagnostic about unused lexical variable in eshell/time Paul Eggert
2015-09-01 3:50 ` Stefan Monnier
@ 2020-09-02 1:08 ` Stefan Kangas
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Kangas @ 2020-09-02 1:08 UTC (permalink / raw)
To: Paul Eggert; +Cc: 21389-done
Paul Eggert <eggert@cs.ucla.edu> writes:
> To reproduce the problem in a fresh build from Emacs master, do this:
>
> touch lisp/eshell/em-unix.el
> make
>
> The output will include the following lines:
>
> eshell/em-unix.el:933:1:Warning: Unused lexical variable ‘args’
> eshell/em-unix.el:963:1:Warning: Unused lexical argument ‘args’
>
> The first diagnostic is bogus. The second one is correct. Perhaps the byte
> compiler is getting confused by the second one and the confusion is affecting
> the first one.
>
> The first diagnostic is generated for code that starts off like this:
>
> (defun eshell/time (&rest args)
> "Implementation of \"time\" in Lisp."
> (let ((time-args (copy-alist args))
> ...
>
> so the lexical variable ‘args’ is being used.
This seems to have been fixed on current master, so I'm closing this bug
report.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-02 1:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-31 21:36 bug#21389: bogus diagnostic about unused lexical variable in eshell/time Paul Eggert
2015-09-01 3:50 ` Stefan Monnier
2020-09-02 1:08 ` Stefan Kangas
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).