diff options
| author | Stefan Monnier | 2004-04-14 20:43:45 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-04-14 20:43:45 +0000 |
| commit | a080ff233cc81c42c70faa374ac0f016dd61db58 (patch) | |
| tree | 419a7d85f6db594a340966bed3ac17b1575616a2 | |
| parent | 58e7eb2a3e4fa6db5f47977e800668bd01883768 (diff) | |
| download | emacs-a080ff233cc81c42c70faa374ac0f016dd61db58.tar.gz emacs-a080ff233cc81c42c70faa374ac0f016dd61db58.zip | |
(batch-byte-compile-file): Give a backtrace if requested.
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 32d6694b060..43e0732104f 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -3966,27 +3966,29 @@ already up-to-date." | |||
| 3966 | (kill-emacs (if error 1 0)))) | 3966 | (kill-emacs (if error 1 0)))) |
| 3967 | 3967 | ||
| 3968 | (defun batch-byte-compile-file (file) | 3968 | (defun batch-byte-compile-file (file) |
| 3969 | (condition-case err | 3969 | (if debug-on-error |
| 3970 | (byte-compile-file file) | 3970 | (byte-compile-file file) |
| 3971 | (file-error | 3971 | (condition-case err |
| 3972 | (message (if (cdr err) | 3972 | (byte-compile-file file) |
| 3973 | ">>Error occurred processing %s: %s (%s)" | 3973 | (file-error |
| 3974 | (message (if (cdr err) | ||
| 3975 | ">>Error occurred processing %s: %s (%s)" | ||
| 3974 | ">>Error occurred processing %s: %s") | 3976 | ">>Error occurred processing %s: %s") |
| 3975 | file | 3977 | file |
| 3976 | (get (car err) 'error-message) | 3978 | (get (car err) 'error-message) |
| 3977 | (prin1-to-string (cdr err))) | 3979 | (prin1-to-string (cdr err))) |
| 3978 | (let ((destfile (byte-compile-dest-file file))) | 3980 | (let ((destfile (byte-compile-dest-file file))) |
| 3979 | (if (file-exists-p destfile) | 3981 | (if (file-exists-p destfile) |
| 3980 | (delete-file destfile))) | 3982 | (delete-file destfile))) |
| 3981 | nil) | 3983 | nil) |
| 3982 | (error | 3984 | (error |
| 3983 | (message (if (cdr err) | 3985 | (message (if (cdr err) |
| 3984 | ">>Error occurred processing %s: %s (%s)" | 3986 | ">>Error occurred processing %s: %s (%s)" |
| 3985 | ">>Error occurred processing %s: %s") | 3987 | ">>Error occurred processing %s: %s") |
| 3986 | file | 3988 | file |
| 3987 | (get (car err) 'error-message) | 3989 | (get (car err) 'error-message) |
| 3988 | (prin1-to-string (cdr err))) | 3990 | (prin1-to-string (cdr err))) |
| 3989 | nil))) | 3991 | nil)))) |
| 3990 | 3992 | ||
| 3991 | ;;;###autoload | 3993 | ;;;###autoload |
| 3992 | (defun batch-byte-recompile-directory () | 3994 | (defun batch-byte-recompile-directory () |