]> git.eshelyaron.com Git - emacs.git/commitdiff
(byte-compile-condition-case): Disable warning about
authorRichard M. Stallman <rms@gnu.org>
Tue, 11 Jan 1994 07:21:47 +0000 (07:21 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 11 Jan 1994 07:21:47 +0000 (07:21 +0000)
symbol not naming a condition.  Allow a list of condition names.

lisp/emacs-lisp/bytecomp.el

index cfb4251c725d6fcc5d9f745ea0a57e68ed5fe117..dc4476866f12fff0cb3aa76a1c03d548e38eecbf 100644 (file)
@@ -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