diff options
| author | Richard M. Stallman | 2002-05-29 16:38:46 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-05-29 16:38:46 +0000 |
| commit | d09b1c02f517ec6a6129dd16ae95dae213975ca9 (patch) | |
| tree | 7bf92e6a43b9747c1cb984f563c75c9ab619ca29 | |
| parent | ba81b532e537cde5920d217fc4211d765886583d (diff) | |
| download | emacs-d09b1c02f517ec6a6129dd16ae95dae213975ca9.tar.gz emacs-d09b1c02f517ec6a6129dd16ae95dae213975ca9.zip | |
(batch-byte-compile-file): Delete the output file if we get a file-error.
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 9ec39ff339b..be317ae672e 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | ;;; This version incorporates changes up to version 2.10 of the | 11 | ;;; This version incorporates changes up to version 2.10 of the |
| 12 | ;;; Zawinski-Furuseth compiler. | 12 | ;;; Zawinski-Furuseth compiler. |
| 13 | (defconst byte-compile-version "$Revision: 2.96 $") | 13 | (defconst byte-compile-version "$Revision: 2.97 $") |
| 14 | 14 | ||
| 15 | ;; This file is part of GNU Emacs. | 15 | ;; This file is part of GNU Emacs. |
| 16 | 16 | ||
| @@ -3716,6 +3716,17 @@ already up-to-date." | |||
| 3716 | (defun batch-byte-compile-file (file) | 3716 | (defun batch-byte-compile-file (file) |
| 3717 | (condition-case err | 3717 | (condition-case err |
| 3718 | (byte-compile-file file) | 3718 | (byte-compile-file file) |
| 3719 | (file-error | ||
| 3720 | (message (if (cdr err) | ||
| 3721 | ">>Error occurred processing %s: %s (%s)" | ||
| 3722 | ">>Error occurred processing %s: %s") | ||
| 3723 | file | ||
| 3724 | (get (car err) 'error-message) | ||
| 3725 | (prin1-to-string (cdr err))) | ||
| 3726 | (let ((destfile (byte-compile-dest-file file))) | ||
| 3727 | (if (file-exists-p destfile) | ||
| 3728 | (delete-file destfile))) | ||
| 3729 | nil) | ||
| 3719 | (error | 3730 | (error |
| 3720 | (message (if (cdr err) | 3731 | (message (if (cdr err) |
| 3721 | ">>Error occurred processing %s: %s (%s)" | 3732 | ">>Error occurred processing %s: %s (%s)" |