diff options
| author | Richard M. Stallman | 2005-07-16 18:27:25 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-07-16 18:27:25 +0000 |
| commit | 83b0af6e4fbf4407f0de26cf00b5823d79d58e91 (patch) | |
| tree | a694ecfce464ac9fa23d1d1828ee3eba80ec8ab9 | |
| parent | 5ba583d104d37eb7a8549c59ebe7fe9b7f55c9e7 (diff) | |
| download | emacs-83b0af6e4fbf4407f0de26cf00b5823d79d58e91.tar.gz emacs-83b0af6e4fbf4407f0de26cf00b5823d79d58e91.zip | |
(byte-compile-or-recursion): New function.
(byte-compile-or): Use that.
(byte-compile-maybe-guarded): Handle (not (featurep 'emacs)).
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 15549ea039f..21d7cd001cf 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -3377,8 +3377,10 @@ warnings during execution of BODY." | |||
| 3377 | (if bound | 3377 | (if bound |
| 3378 | (cons bound byte-compile-bound-variables) | 3378 | (cons bound byte-compile-bound-variables) |
| 3379 | byte-compile-bound-variables)) | 3379 | byte-compile-bound-variables)) |
| 3380 | ;; Suppress all warnings, for code not used in Emacs. | ||
| 3380 | (byte-compile-warnings | 3381 | (byte-compile-warnings |
| 3381 | (if (equal ,condition '(featurep 'xemacs)) | 3382 | (if (member ,condition '((featurep 'xemacs) |
| 3383 | (not (featurep 'emacs)))) | ||
| 3382 | nil byte-compile-warnings))) | 3384 | nil byte-compile-warnings))) |
| 3383 | (unwind-protect | 3385 | (unwind-protect |
| 3384 | (progn ,@body) | 3386 | (progn ,@body) |
| @@ -3450,7 +3452,7 @@ warnings during execution of BODY." | |||
| 3450 | (byte-compile-form-do-effect t) | 3452 | (byte-compile-form-do-effect t) |
| 3451 | (byte-compile-and-recursion args failtag)))) | 3453 | (byte-compile-and-recursion args failtag)))) |
| 3452 | 3454 | ||
| 3453 | ;; Handle compilation of a multi-argument `and' call. | 3455 | ;; Handle compilation of a nontrivial `and' call. |
| 3454 | ;; We use tail recursion so we can use byte-compile-maybe-guarded. | 3456 | ;; We use tail recursion so we can use byte-compile-maybe-guarded. |
| 3455 | (defun byte-compile-and-recursion (rest failtag) | 3457 | (defun byte-compile-and-recursion (rest failtag) |
| 3456 | (if (cdr rest) | 3458 | (if (cdr rest) |
| @@ -3467,12 +3469,19 @@ warnings during execution of BODY." | |||
| 3467 | (args (cdr form))) | 3469 | (args (cdr form))) |
| 3468 | (if (null args) | 3470 | (if (null args) |
| 3469 | (byte-compile-form-do-effect nil) | 3471 | (byte-compile-form-do-effect nil) |
| 3470 | (while (cdr args) | 3472 | (byte-compile-or-recursion args wintag)))) |
| 3471 | (byte-compile-form (car args)) | 3473 | |
| 3474 | ;; Handle compilation of a nontrivial `or' call. | ||
| 3475 | ;; We use tail recursion so we can use byte-compile-maybe-guarded. | ||
| 3476 | (defun byte-compile-or-recursion (rest wintag) | ||
| 3477 | (if (cdr rest) | ||
| 3478 | (progn | ||
| 3479 | (byte-compile-form (car rest)) | ||
| 3472 | (byte-compile-goto-if t for-effect wintag) | 3480 | (byte-compile-goto-if t for-effect wintag) |
| 3473 | (setq args (cdr args))) | 3481 | (byte-compile-maybe-guarded (list 'not (car rest)) |
| 3474 | (byte-compile-form-do-effect (car args)) | 3482 | (byte-compile-or-recursion (cdr rest) wintag))) |
| 3475 | (byte-compile-out-tag wintag)))) | 3483 | (byte-compile-form-do-effect (car rest)) |
| 3484 | (byte-compile-out-tag wintag))) | ||
| 3476 | 3485 | ||
| 3477 | (defun byte-compile-while (form) | 3486 | (defun byte-compile-while (form) |
| 3478 | (let ((endtag (byte-compile-make-tag)) | 3487 | (let ((endtag (byte-compile-make-tag)) |