* lisp/emacs-lisp/bytecomp.el (byte-compile--declare-var): Fix warning
Make sure the "declared after first use" is under the control of the `lexical` option.
This commit is contained in:
parent
0df23b73e4
commit
b9511362f5
1 changed files with 2 additions and 1 deletions
|
@ -2505,7 +2505,8 @@ list that represents a doc string reference.
|
|||
(when (memq sym byte-compile-lexical-variables)
|
||||
(setq byte-compile-lexical-variables
|
||||
(delq sym byte-compile-lexical-variables))
|
||||
(byte-compile-warn "Variable `%S' declared after its first use" sym))
|
||||
(when (byte-compile-warning-enabled-p 'lexical sym)
|
||||
(byte-compile-warn "Variable `%S' declared after its first use" sym)))
|
||||
(push sym byte-compile-bound-variables)
|
||||
(push sym byte-compile--seen-defvars))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue