[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21389: bogus diagnostic about unused lexical variable in eshell/time
From: |
Paul Eggert |
Subject: |
bug#21389: bogus diagnostic about unused lexical variable in eshell/time |
Date: |
Mon, 31 Aug 2015 14:36:33 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
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.
- bug#21389: bogus diagnostic about unused lexical variable in eshell/time,
Paul Eggert <=