diff options
author | Richard M. Stallman <rms@gnu.org> | 2002-05-29 16:38:46 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2002-05-29 16:38:46 +0000 |
commit | d09b1c02f517ec6a6129dd16ae95dae213975ca9 (patch) | |
tree | 7bf92e6a43b9747c1cb984f563c75c9ab619ca29 /lisp/emacs-lisp | |
parent | ba81b532e537cde5920d217fc4211d765886583d (diff) | |
download | emacs-d09b1c02f517ec6a6129dd16ae95dae213975ca9.tar.gz emacs-d09b1c02f517ec6a6129dd16ae95dae213975ca9.tar.bz2 emacs-d09b1c02f517ec6a6129dd16ae95dae213975ca9.zip |
(batch-byte-compile-file): Delete the output file if we get a file-error.
Diffstat (limited to 'lisp/emacs-lisp')
-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 @@ ;;; This version incorporates changes up to version 2.10 of the ;;; Zawinski-Furuseth compiler. -(defconst byte-compile-version "$Revision: 2.96 $") +(defconst byte-compile-version "$Revision: 2.97 $") ;; This file is part of GNU Emacs. @@ -3716,6 +3716,17 @@ already up-to-date." (defun batch-byte-compile-file (file) (condition-case err (byte-compile-file file) + (file-error + (message (if (cdr err) + ">>Error occurred processing %s: %s (%s)" + ">>Error occurred processing %s: %s") + file + (get (car err) 'error-message) + (prin1-to-string (cdr err))) + (let ((destfile (byte-compile-dest-file file))) + (if (file-exists-p destfile) + (delete-file destfile))) + nil) (error (message (if (cdr err) ">>Error occurred processing %s: %s (%s)" |