diff options
| author | Chong Yidong | 2006-11-19 15:19:39 +0000 |
|---|---|---|
| committer | Chong Yidong | 2006-11-19 15:19:39 +0000 |
| commit | 8195ef65f0098b9347e22349fbfa292150d5ad2b (patch) | |
| tree | f1aa92246719c6ba8ef39e3149b73d29f9387a81 | |
| parent | 6733b28d13fffca3c7b1b62164e30121c88f4ca2 (diff) | |
| download | emacs-8195ef65f0098b9347e22349fbfa292150d5ad2b.tar.gz emacs-8195ef65f0098b9347e22349fbfa292150d5ad2b.zip | |
(byte-compile-if): Revert last change.
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 55 |
1 files changed, 24 insertions, 31 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 342ae2ab33a..02a88c13973 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -3398,42 +3398,35 @@ being undefined will be suppressed. | |||
| 3398 | If CONDITION's value is (not (featurep 'emacs)) or (featurep 'xemacs), | 3398 | If CONDITION's value is (not (featurep 'emacs)) or (featurep 'xemacs), |
| 3399 | that suppresses all warnings during execution of BODY." | 3399 | that suppresses all warnings during execution of BODY." |
| 3400 | (declare (indent 1) (debug t)) | 3400 | (declare (indent 1) (debug t)) |
| 3401 | `(let* ((byte-compile-warnings | 3401 | `(let* ((fbound |
| 3402 | ;; Suppress all warnings, for code not used in Emacs. | 3402 | (if (eq 'fboundp (car-safe ,condition)) |
| 3403 | (and (eq 'quote (car-safe (nth 1 ,condition))) | ||
| 3404 | ;; Ignore if the symbol is already on the | ||
| 3405 | ;; unresolved list. | ||
| 3406 | (not (assq (nth 1 (nth 1 ,condition)) ; the relevant symbol | ||
| 3407 | byte-compile-unresolved-functions)) | ||
| 3408 | (nth 1 (nth 1 ,condition))))) | ||
| 3409 | (bound (if (or (eq 'boundp (car-safe ,condition)) | ||
| 3410 | (eq 'default-boundp (car-safe ,condition))) | ||
| 3411 | (and (eq 'quote (car-safe (nth 1 ,condition))) | ||
| 3412 | (nth 1 (nth 1 ,condition))))) | ||
| 3413 | ;; Maybe add to the bound list. | ||
| 3414 | (byte-compile-bound-variables | ||
| 3415 | (if bound | ||
| 3416 | (cons bound byte-compile-bound-variables) | ||
| 3417 | byte-compile-bound-variables)) | ||
| 3418 | ;; Suppress all warnings, for code not used in Emacs. | ||
| 3419 | (byte-compile-warnings | ||
| 3403 | (if (member ,condition '((featurep 'xemacs) | 3420 | (if (member ,condition '((featurep 'xemacs) |
| 3404 | (not (featurep 'emacs)))) | 3421 | (not (featurep 'emacs)))) |
| 3405 | nil | 3422 | nil byte-compile-warnings))) |
| 3406 | byte-compile-warnings)) | ||
| 3407 | (byte-compile-bound-variables byte-compile-bound-variables) | ||
| 3408 | binding fbound-list) | ||
| 3409 | (mapc (lambda (subcondition) | ||
| 3410 | (cond ((eq 'fboundp (car-safe subcondition)) | ||
| 3411 | (setq binding (and (eq 'quote (car-safe (nth 1 subcondition))) | ||
| 3412 | ;; Ignore if the symbol is already on the | ||
| 3413 | ;; unresolved list. | ||
| 3414 | (not (assq (nth 1 (nth 1 subcondition)) | ||
| 3415 | byte-compile-unresolved-functions)) | ||
| 3416 | (nth 1 (nth 1 subcondition)))) | ||
| 3417 | (if binding (setq fbound-list (cons binding fbound-list)))) | ||
| 3418 | ((or (eq 'boundp (car-safe subcondition)) | ||
| 3419 | (eq 'default-boundp (car-safe subcondition))) | ||
| 3420 | (setq binding (and (eq 'quote (car-safe (nth 1 subcondition))) | ||
| 3421 | (nth 1 (nth 1 subcondition)))) | ||
| 3422 | (if binding (setq byte-compile-bound-variables | ||
| 3423 | (cons binding byte-compile-bound-variables)))))) | ||
| 3424 | ;; Inspect each element in an `and' condition; otherwise, | ||
| 3425 | ;; inspect the condition itself. | ||
| 3426 | (if (eq 'and (car-safe ,condition)) | ||
| 3427 | (cdr ,condition) | ||
| 3428 | (list ,condition))) | ||
| 3429 | (unwind-protect | 3423 | (unwind-protect |
| 3430 | (progn ,@body) | 3424 | (progn ,@body) |
| 3431 | ;; Maybe remove the function symbol from the unresolved list. | 3425 | ;; Maybe remove the function symbol from the unresolved list. |
| 3432 | (mapc (lambda (fun) | 3426 | (if fbound |
| 3433 | (setq byte-compile-unresolved-functions | 3427 | (setq byte-compile-unresolved-functions |
| 3434 | (delq (assq fun byte-compile-unresolved-functions) | 3428 | (delq (assq fbound byte-compile-unresolved-functions) |
| 3435 | byte-compile-unresolved-functions))) | 3429 | byte-compile-unresolved-functions)))))) |
| 3436 | fbound-list)))) | ||
| 3437 | 3430 | ||
| 3438 | (defun byte-compile-if (form) | 3431 | (defun byte-compile-if (form) |
| 3439 | (byte-compile-form (car (cdr form))) | 3432 | (byte-compile-form (car (cdr form))) |