mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 02:31:03 -08:00
Warn about ignore-error with quoted condition argument
* lisp/subr.el (ignore-error): Clarify condition argument in doc string and add warning. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-warn-quoted-condition): New test.
This commit is contained in:
parent
a6db8464e1
commit
1480865e64
2 changed files with 16 additions and 2 deletions
|
|
@ -922,6 +922,11 @@ byte-compiled. Run with dynamic binding."
|
|||
(bytecomp--with-warning-test "defvar.*foo.*wider than.*characters"
|
||||
`(defvar foo t ,bytecomp-tests--docstring)))
|
||||
|
||||
(ert-deftest bytecomp-warn-quoted-condition ()
|
||||
(bytecomp--with-warning-test
|
||||
"Warning: `ignore-error' condition argument should not be quoted: 'error"
|
||||
'(ignore-error 'error (abc))))
|
||||
|
||||
(ert-deftest bytecomp-warn-dodgy-args-eq ()
|
||||
(dolist (fn '(eq eql))
|
||||
(cl-flet ((msg (type arg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue