Warn about misplaced :success in condition-case (bug#64404)
* lisp/emacs-lisp/bytecomp.el (byte-compile-condition-case): Warn if :success is part of a list of conditions (it must come alone).
This commit is contained in:
parent
a2ccab18ca
commit
59a350cb91
1 changed files with 4 additions and 0 deletions
|
@ -5060,6 +5060,10 @@ binding slots have been popped."
|
|||
(byte-compile-warn-x
|
||||
condition "`condition-case' condition should not be quoted: %S"
|
||||
condition))
|
||||
(when (and (consp condition) (memq :success condition))
|
||||
(byte-compile-warn-x
|
||||
condition
|
||||
"`:success' must be the first element of a `condition-case' handler"))
|
||||
(unless (consp condition) (setq condition (list condition)))
|
||||
(dolist (c condition)
|
||||
(unless (and c (symbolp c))
|
||||
|
|
Loading…
Add table
Reference in a new issue