diff lisp/cmdloop.el @ 410:de805c49cfc1 r21-2-35

Import from CVS: tag r21-2-35
author cvs
date Mon, 13 Aug 2007 11:19:21 +0200
parents 74fd4e045ea6
children 697ef44129c6
line wrap: on
line diff
--- a/lisp/cmdloop.el	Mon Aug 13 11:18:12 2007 +0200
+++ b/lisp/cmdloop.el	Mon Aug 13 11:19:21 2007 +0200
@@ -130,9 +130,10 @@
   :group 'editing-basics)
 
 (defun command-error (error-object)
-  (let ((inhibit-quit t)
-	(debug-on-error nil)
-	(etype (car-safe error-object)))
+  (let* ((old-debug-on-error debug-on-error)
+	 (inhibit-quit t)
+	 (debug-on-error nil)
+	 (etype (car-safe error-object)))
     (setq quit-flag nil)
     (setq standard-output t)
     (setq standard-input t)
@@ -161,7 +162,12 @@
 
     (if (noninteractive)
         (progn
-          (message "%s exiting." emacs-program-name)
+	  (if old-debug-on-error
+	      (progn
+		(message "Backtrace:\n\n")
+		(backtrace)
+		(message "\n")))
+          (message "%s exiting\n." emacs-program-name)
           (kill-emacs -1)))
     t))