diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-06-27 16:14:32 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-06-27 16:14:32 -0400 |
commit | 82875b15750401daa358c1bebaba5969b96f0d88 (patch) | |
tree | 2f91e8dcb2ae87762d536015ab03d7ddb88466b3 /test/lisp/emacs-lisp | |
parent | cf4ccc58284de50959ea66b1cd2655ab2fa4d15b (diff) | |
download | emacs-82875b15750401daa358c1bebaba5969b96f0d88.tar.gz emacs-82875b15750401daa358c1bebaba5969b96f0d88.tar.bz2 emacs-82875b15750401daa358c1bebaba5969b96f0d88.zip |
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.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r-- | test/lisp/emacs-lisp/cl-macs-tests.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/lisp/emacs-lisp/cl-macs-tests.el b/test/lisp/emacs-lisp/cl-macs-tests.el index 01ca56386e3..983cbfc8bc7 100644 --- a/test/lisp/emacs-lisp/cl-macs-tests.el +++ b/test/lisp/emacs-lisp/cl-macs-tests.el @@ -812,8 +812,10 @@ See Bug#57915." ;; In ELisp function arguments are always statically scoped (bug#47552). (let ((cl--test-a 'dyn) ;; FIXME: How do we silence the "Lexical argument shadows" warning? - (f (cl-function (lambda (&key cl--test-a b) - (list cl--test-a (symbol-value 'cl--test-a) b))))) + (f + (with-suppressed-warnings ((lexical cl--test-a)) + (cl-function (lambda (&key cl--test-a b) + (list cl--test-a (symbol-value 'cl--test-a) b)))))) (should (equal (funcall f :cl--test-a 'lex :b 2) '(lex dyn 2))))) (cl-defstruct cl--test-s |