emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el,v
Date: Sun, 19 Nov 2006 15:19:39 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      06/11/19 15:19:39

Index: bytecomp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/bytecomp.el,v
retrieving revision 2.187
retrieving revision 2.188
diff -u -b -r2.187 -r2.188
--- bytecomp.el 18 Nov 2006 21:07:17 -0000      2.187
+++ bytecomp.el 19 Nov 2006 15:19:39 -0000      2.188
@@ -3398,42 +3398,35 @@
 If CONDITION's value is (not (featurep 'emacs)) or (featurep 'xemacs),
 that suppresses all warnings during execution of BODY."
   (declare (indent 1) (debug t))
-  `(let* ((byte-compile-warnings
-          ;; Suppress all warnings, for code not used in Emacs.
-          (if (member ,condition '((featurep 'xemacs)
-                                   (not (featurep 'emacs))))
-              nil
-            byte-compile-warnings))
-         (byte-compile-bound-variables byte-compile-bound-variables)
-         binding fbound-list)
-     (mapc (lambda (subcondition)
-            (cond ((eq 'fboundp (car-safe subcondition))
-                   (setq binding (and (eq 'quote (car-safe (nth 1 
subcondition)))
+  `(let* ((fbound
+          (if (eq 'fboundp (car-safe ,condition))
+              (and (eq 'quote (car-safe (nth 1 ,condition)))
                                       ;; Ignore if the symbol is already on the
                                       ;; unresolved list.
-                                      (not (assq (nth 1 (nth 1 subcondition))
+                   (not (assq (nth 1 (nth 1 ,condition)) ; the relevant symbol
                                                  
byte-compile-unresolved-functions))
-                                      (nth 1 (nth 1 subcondition))))
-                   (if binding (setq fbound-list (cons binding fbound-list))))
-                  ((or (eq 'boundp (car-safe subcondition))
-                       (eq 'default-boundp (car-safe subcondition)))
-                   (setq binding (and (eq 'quote (car-safe (nth 1 
subcondition)))
-                                      (nth 1 (nth 1 subcondition))))
-                   (if binding (setq byte-compile-bound-variables
-                                     (cons binding 
byte-compile-bound-variables))))))
-          ;; Inspect each element in an `and' condition; otherwise,
-          ;; inspect the condition itself.
-          (if (eq 'and (car-safe ,condition))
-              (cdr ,condition)
-            (list ,condition)))
+                   (nth 1 (nth 1 ,condition)))))
+         (bound (if (or (eq 'boundp (car-safe ,condition))
+                        (eq 'default-boundp (car-safe ,condition)))
+                    (and (eq 'quote (car-safe (nth 1 ,condition)))
+                         (nth 1 (nth 1 ,condition)))))
+         ;; Maybe add to the bound list.
+         (byte-compile-bound-variables
+          (if bound
+              (cons bound byte-compile-bound-variables)
+            byte-compile-bound-variables))
+         ;; Suppress all warnings, for code not used in Emacs.
+         (byte-compile-warnings
+          (if (member ,condition '((featurep 'xemacs)
+                                   (not (featurep 'emacs))))
+              nil byte-compile-warnings)))
      (unwind-protect
         (progn ,@body)
        ;; Maybe remove the function symbol from the unresolved list.
-       (mapc (lambda (fun)
+       (if fbound
               (setq byte-compile-unresolved-functions
-                    (delq (assq fun byte-compile-unresolved-functions)
-                          byte-compile-unresolved-functions)))
-            fbound-list))))
+                (delq (assq fbound byte-compile-unresolved-functions)
+                      byte-compile-unresolved-functions))))))
 
 (defun byte-compile-if (form)
   (byte-compile-form (car (cdr form)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]