bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4228: 23.1; --script and stack-trace-on-error


From: Tom Tromey
Subject: bug#4228: 23.1; --script and stack-trace-on-error
Date: Fri, 18 Sep 2009 19:57:44 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Dan> [No idea why stack-trace-on-error does not work]

I looked at this a little bit.

eval.c:find_handler_clause prints to a buffer named *Backtrace*.  So,
I'm guessing that the stack trace is created -- just not visible.

The appended patch works for me.

Tom

2009-09-19  Tom Tromey  <address@hidden>

        * eval.c (find_handler_clause): Respect 'noninteractive'.

diff --git a/src/eval.c b/src/eval.c
index 8299474..44f8ec7 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1922,14 +1922,19 @@ find_handler_clause (handlers, conditions, sig, data)
        {
          max_lisp_eval_depth += 15;
          max_specpdl_size++;
+         if (noninteractive)
+           Fbacktrace ();
+         else
+           {
 #ifdef PROTOTYPES
-         internal_with_output_to_temp_buffer ("*Backtrace*",
-                                              (Lisp_Object (*) (Lisp_Object)) 
Fbacktrace,
-                                              Qnil);
+             internal_with_output_to_temp_buffer ("*Backtrace*",
+                                                  (Lisp_Object (*) 
(Lisp_Object)) Fbacktrace,
+                                                  Qnil);
 #else
-         internal_with_output_to_temp_buffer ("*Backtrace*",
-                                              Fbacktrace, Qnil);
+             internal_with_output_to_temp_buffer ("*Backtrace*",
+                                                  Fbacktrace, Qnil);
 #endif
+           }
          max_specpdl_size--;
          max_lisp_eval_depth -= 15;
        }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]