From 24811ee757301b782d30457c5015db482d0e1897 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 20 Jun 2012 20:53:03 -0500 Subject: [PATCH] Show full backtraces if `async-debug' is non-nil --- async.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/async.el b/async.el index 11ee5c249..e951b693c 100644 --- a/async.el +++ b/async.el @@ -139,14 +139,19 @@ as follows: (defun async-batch-invoke () "Called from the child Emacs process' command-line." - (setq async-in-child-emacs t) - (condition-case err + (setq async-in-child-emacs t + debug-on-error async-debug) + (if debug-on-error (prin1 (funcall (async--receive-sexp (unless async-send-over-pipe command-line-args-left)))) - (error - (backtrace) - (prin1 `(async-signal . ,err))))) + (condition-case err + (prin1 (funcall + (async--receive-sexp (unless async-send-over-pipe + command-line-args-left)))) + (error + (backtrace) + (prin1 `(async-signal . ,err)))))) (defun async-ready (future) "Query a FUTURE to see if the ready is ready -- i.e., if no blocking -- 2.39.2