aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-12-08 12:00:57 +0000
committerGerd Moellmann1999-12-08 12:00:57 +0000
commit3648c84252986145a376aa406bb83e987ea0e96b (patch)
tree207bb4ec0b47b0e0643c42f38ab460aff9631654 /src
parent3e569d228e68690d53bea93614652dc39d8289fd (diff)
downloademacs-3648c84252986145a376aa406bb83e987ea0e96b.tar.gz
emacs-3648c84252986145a376aa406bb83e987ea0e96b.zip
(call_debugger): When entering the debugger while redisplaying,
reset redisplaying_p, and go back to the top-level if the debugger returns.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/eval.c29
2 files changed, 28 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2989c6a3a3e..e9752f527cc 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
11999-12-08 Gerd Moellmann <gerd@gnu.org>
2
3 * eval.c: Remove conditional compilation on `standalone'.
4 (call_debugger): When entering the debugger while redisplaying,
5 reset redisplaying_p, and go back to the top-level if the debugger
6 returns.
7
11999-12-07 Gerd Moellmann <gerd@gnu.org> 81999-12-07 Gerd Moellmann <gerd@gnu.org>
2 9
3 * xfaces.c (x_set_menu_resources_from_menu_face): Make sure 10 * xfaces.c (x_set_menu_resources_from_menu_face): Make sure
diff --git a/src/eval.c b/src/eval.c
index f911433e712..0fb517aef2b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -20,17 +20,11 @@ Boston, MA 02111-1307, USA. */
20 20
21 21
22#include <config.h> 22#include <config.h>
23
24#include "lisp.h" 23#include "lisp.h"
25#include "blockinput.h" 24#include "blockinput.h"
26
27#ifndef standalone
28#include "commands.h" 25#include "commands.h"
29#include "keyboard.h" 26#include "keyboard.h"
30#else 27#include "dispextern.h"
31#define INTERACTIVE 1
32#endif
33
34#include <setjmp.h> 28#include <setjmp.h>
35 29
36/* This definition is duplicated in alloc.c and keyboard.c */ 30/* This definition is duplicated in alloc.c and keyboard.c */
@@ -202,13 +196,32 @@ Lisp_Object
202call_debugger (arg) 196call_debugger (arg)
203 Lisp_Object arg; 197 Lisp_Object arg;
204{ 198{
199 int debug_while_redisplaying;
200 Lisp_Object val;
201
205 if (lisp_eval_depth + 20 > max_lisp_eval_depth) 202 if (lisp_eval_depth + 20 > max_lisp_eval_depth)
206 max_lisp_eval_depth = lisp_eval_depth + 20; 203 max_lisp_eval_depth = lisp_eval_depth + 20;
204
207 if (specpdl_size + 40 > max_specpdl_size) 205 if (specpdl_size + 40 > max_specpdl_size)
208 max_specpdl_size = specpdl_size + 40; 206 max_specpdl_size = specpdl_size + 40;
207
209 debug_on_next_call = 0; 208 debug_on_next_call = 0;
210 when_entered_debugger = num_nonmacro_input_events; 209 when_entered_debugger = num_nonmacro_input_events;
211 return apply1 (Vdebugger, arg); 210
211 /* Resetting redisplaying_p to 0 makes sure that debug output is
212 displayed if the debugger is invoked during redisplay. */
213 debug_while_redisplaying = redisplaying_p;
214 redisplaying_p = 0;
215
216 val = apply1 (Vdebugger, arg);
217
218 /* Interrupting redisplay and resuming it later is not safe under
219 all circumstances. So, when the debugger returns, abort the
220 interupted redisplay by going back to the top-level. */
221 if (debug_while_redisplaying)
222 Ftop_level ();
223
224 return val;
212} 225}
213 226
214void 227void