changeset 54890:ab70a3ddd144

(batch-byte-compile-file): Give a backtrace if requested.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 14 Apr 2004 20:43:45 +0000
parents d1e4aef75070
children 6258852d3607
files lisp/emacs-lisp/bytecomp.el
diffstat 1 files changed, 20 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/bytecomp.el	Wed Apr 14 20:41:47 2004 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Wed Apr 14 20:43:45 2004 +0000
@@ -3966,27 +3966,29 @@
     (kill-emacs (if error 1 0))))
 
 (defun batch-byte-compile-file (file)
-  (condition-case err
+  (if debug-on-error
       (byte-compile-file file)
-    (file-error
-     (message (if (cdr err)
-		  ">>Error occurred processing %s: %s (%s)"
+    (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)"
+		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)"
 		  ">>Error occurred processing %s: %s")
-	      file
-	      (get (car err) 'error-message)
-	      (prin1-to-string (cdr err)))
-     nil)))
+		file
+		(get (car err) 'error-message)
+		(prin1-to-string (cdr err)))
+       nil))))
 
 ;;;###autoload
 (defun batch-byte-recompile-directory ()