cl-macs-tests.el (cl-&key-arguments): Fix regression
* lisp/emacs-lisp/bytecomp.el (byte-compile-form): Turn "cannot use lexical var" errors into warnings. Make the obey `with-suppressed-warnings`. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments): Suppress warnings.
This commit is contained in:
parent
cf4ccc5828
commit
82875b1575
2 changed files with 7 additions and 4 deletions
|
@ -3473,8 +3473,9 @@ lambda-expression."
|
|||
run-hook-with-args-until-failure))
|
||||
(pcase (cdr form)
|
||||
(`(',var . ,_)
|
||||
(when (memq var byte-compile-lexical-variables)
|
||||
(byte-compile-report-error
|
||||
(when (and (memq var byte-compile-lexical-variables)
|
||||
(byte-compile-warning-enabled-p 'lexical var))
|
||||
(byte-compile-warn
|
||||
(format-message "%s cannot use lexical var `%s'" fn var))))))
|
||||
;; Warn about using obsolete hooks.
|
||||
(if (memq fn '(add-hook remove-hook))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue