aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1994-01-11 07:21:47 +0000
committerRichard M. Stallman <[email protected]>1994-01-11 07:21:47 +0000
commit2abcddce3b79d0efd6e9537e9a2fb420af0ab863 (patch)
tree64fc003cf058f949bbd91c66b7295ecafed3bc17 /lisp/emacs-lisp
parent2ea6d561514f14c7c4d3479c9cf2b2d793c34ff1 (diff)
(byte-compile-condition-case): Disable warning about
symbol not naming a condition. Allow a list of condition names.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el24
1 files changed, 16 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index cfb4251c72..dc4476866f 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2681,16 +2681,24 @@ If FORM is a lambda or a macro, byte-compile it as a function."
(while clauses
(let* ((clause (car clauses))
(condition (car clause)))
- (cond ((not (symbolp condition))
+ (cond ((not (or (symbolp condition)
+ (and (listp condition)
+ (let ((syms condition) (ok t))
+ (while syms
+ (if (not (symbolp (car syms)))
+ (setq ok nil))
+ (setq syms (cdr syms)))
+ ok))))
(byte-compile-warn
- "%s is not a symbol naming a condition (in condition-case)"
+ "%s is not a condition name or list of such (in condition-case)"
(prin1-to-string condition)))
- ((not (or (eq condition 't)
- (and (stringp (get condition 'error-message))
- (consp (get condition 'error-conditions)))))
- (byte-compile-warn
- "%s is not a known condition name (in condition-case)"
- condition)))
+;; ((not (or (eq condition 't)
+;; (and (stringp (get condition 'error-message))
+;; (consp (get condition 'error-conditions)))))
+;; (byte-compile-warn
+;; "%s is not a known condition name (in condition-case)"
+;; condition))
+ )
(setq compiled-clauses
(cons (cons condition
(byte-compile-top-level-body