changeset 105127:fb0a1e29af2a

(find_handler_clause): Make stack-trace-on-error work in batch mode (bug#4228).
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 20 Sep 2009 17:05:00 +0000
parents 82212781ad78
children c4c3db18d05c
files src/ChangeLog src/eval.c
diffstat 2 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sun Sep 20 16:44:50 2009 +0000
+++ b/src/ChangeLog	Sun Sep 20 17:05:00 2009 +0000
@@ -1,3 +1,8 @@
+2009-09-20  Tom Tromey  <tromey@redhat.com>
+
+	* eval.c (find_handler_clause): Make stack-trace-on-error work in
+	batch mode (bug#4228).
+
 2009-09-18  Rob Christie  <robchristie@gmail.com> (tiny change)
 
 	* nsmenu.m (EmacsMenu-parseKeyEquiv:): Parse key equivalent more
--- a/src/eval.c	Sun Sep 20 16:44:50 2009 +0000
+++ b/src/eval.c	Sun Sep 20 17:05:00 2009 +0000
@@ -1945,14 +1945,13 @@
 	{
 	  max_lisp_eval_depth += 15;
 	  max_specpdl_size++;
-#ifdef PROTOTYPES
-	  internal_with_output_to_temp_buffer ("*Backtrace*",
-					       (Lisp_Object (*) (Lisp_Object)) Fbacktrace,
-					       Qnil);
-#else
-	  internal_with_output_to_temp_buffer ("*Backtrace*",
-					       Fbacktrace, Qnil);
-#endif
+	  if (noninteractive)
+	    Fbacktrace ();
+	  else
+	    internal_with_output_to_temp_buffer
+	      ("*Backtrace*",
+	       (Lisp_Object (*) (Lisp_Object)) Fbacktrace,
+	       Qnil);
 	  max_specpdl_size--;
 	  max_lisp_eval_depth -= 15;
 	}