Mercurial > emacs
comparison src/xdisp.c @ 43945:fed6d1639bb4
(redisplay_internal, redisplay_windows):
Use list_of_error to call internal_condition_case_1.
(safe_eval, safe_call): Pass Qt to internal_condition_case_{1,2}
so as to catch all errors with no possibility of debugger redisplay.
(list_of_error): New variable.
(syms_of_xdisp): Init and staticpro it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 16 Mar 2002 07:05:59 +0000 |
parents | 558f4f145d78 |
children | 45bade9bdfe3 |
comparison
equal
deleted
inserted
replaced
43944:42291dbdcf4b | 43945:fed6d1639bb4 |
---|---|
223 Lisp_Object QCeval, Qwhen, QCfile, QCdata, QCpropertize; | 223 Lisp_Object QCeval, Qwhen, QCfile, QCdata, QCpropertize; |
224 Lisp_Object Qfontified; | 224 Lisp_Object Qfontified; |
225 Lisp_Object Qgrow_only; | 225 Lisp_Object Qgrow_only; |
226 Lisp_Object Qinhibit_eval_during_redisplay; | 226 Lisp_Object Qinhibit_eval_during_redisplay; |
227 Lisp_Object Qbuffer_position, Qposition, Qobject; | 227 Lisp_Object Qbuffer_position, Qposition, Qobject; |
228 | |
229 /* Holds the list (error). */ | |
230 Lisp_Object list_of_error; | |
228 | 231 |
229 /* Functions called to fontify regions of text. */ | 232 /* Functions called to fontify regions of text. */ |
230 | 233 |
231 Lisp_Object Vfontification_functions; | 234 Lisp_Object Vfontification_functions; |
232 Lisp_Object Qfontification_functions; | 235 Lisp_Object Qfontification_functions; |
1321 int count = BINDING_STACK_SIZE (); | 1324 int count = BINDING_STACK_SIZE (); |
1322 struct gcpro gcpro1; | 1325 struct gcpro gcpro1; |
1323 | 1326 |
1324 GCPRO1 (sexpr); | 1327 GCPRO1 (sexpr); |
1325 specbind (Qinhibit_redisplay, Qt); | 1328 specbind (Qinhibit_redisplay, Qt); |
1326 val = internal_condition_case_1 (Feval, sexpr, Qerror, | 1329 /* Use Qt to ensure debugger does not run, |
1330 so there is no possibility of wanting to redisplay. */ | |
1331 val = internal_condition_case_1 (Feval, sexpr, Qt, | |
1327 safe_eval_handler); | 1332 safe_eval_handler); |
1328 UNGCPRO; | 1333 UNGCPRO; |
1329 val = unbind_to (count, val); | 1334 val = unbind_to (count, val); |
1330 } | 1335 } |
1331 | 1336 |
1352 struct gcpro gcpro1; | 1357 struct gcpro gcpro1; |
1353 | 1358 |
1354 GCPRO1 (args[0]); | 1359 GCPRO1 (args[0]); |
1355 gcpro1.nvars = nargs; | 1360 gcpro1.nvars = nargs; |
1356 specbind (Qinhibit_redisplay, Qt); | 1361 specbind (Qinhibit_redisplay, Qt); |
1357 val = internal_condition_case_2 (Ffuncall, nargs, args, Qerror, | 1362 /* Use Qt to ensure debugger does not run, |
1363 so there is no possibility of wanting to redisplay. */ | |
1364 val = internal_condition_case_2 (Ffuncall, nargs, args, Qt, | |
1358 safe_eval_handler); | 1365 safe_eval_handler); |
1359 UNGCPRO; | 1366 UNGCPRO; |
1360 val = unbind_to (count, val); | 1367 val = unbind_to (count, val); |
1361 } | 1368 } |
1362 | 1369 |
8958 { | 8965 { |
8959 Lisp_Object mini_window; | 8966 Lisp_Object mini_window; |
8960 struct frame *mini_frame; | 8967 struct frame *mini_frame; |
8961 | 8968 |
8962 displayed_buffer = XBUFFER (XWINDOW (selected_window)->buffer); | 8969 displayed_buffer = XBUFFER (XWINDOW (selected_window)->buffer); |
8963 internal_condition_case_1 (redisplay_window_1, selected_window, Qerror, | 8970 /* Use list_of_error, not Qerror, so that |
8971 we catch only errors and don't run the debugger. */ | |
8972 internal_condition_case_1 (redisplay_window_1, selected_window, | |
8973 list_of_error, | |
8964 redisplay_window_error); | 8974 redisplay_window_error); |
8965 | 8975 |
8966 /* Compare desired and current matrices, perform output. */ | 8976 /* Compare desired and current matrices, perform output. */ |
8967 update: | 8977 update: |
8968 | 8978 |
9297 else if (!NILP (w->vchild)) | 9307 else if (!NILP (w->vchild)) |
9298 redisplay_windows (w->vchild); | 9308 redisplay_windows (w->vchild); |
9299 else | 9309 else |
9300 { | 9310 { |
9301 displayed_buffer = XBUFFER (w->buffer); | 9311 displayed_buffer = XBUFFER (w->buffer); |
9302 internal_condition_case_1 (redisplay_window_0, window, Qerror, | 9312 /* Use list_of_error, not Qerror, so that |
9313 we catch only errors and don't run the debugger. */ | |
9314 internal_condition_case_1 (redisplay_window_0, window, | |
9315 list_of_error, | |
9303 redisplay_window_error); | 9316 redisplay_window_error); |
9304 } | 9317 } |
9305 | 9318 |
9306 window = w->next; | 9319 window = w->next; |
9307 } | 9320 } |
14885 Qbuffer_position = intern ("buffer-position"); | 14898 Qbuffer_position = intern ("buffer-position"); |
14886 staticpro (&Qbuffer_position); | 14899 staticpro (&Qbuffer_position); |
14887 Qobject = intern ("object"); | 14900 Qobject = intern ("object"); |
14888 staticpro (&Qobject); | 14901 staticpro (&Qobject); |
14889 | 14902 |
14903 list_of_error = Fcons (intern ("error"), Qnil); | |
14904 staticpro (&list_of_error); | |
14905 | |
14890 last_arrow_position = Qnil; | 14906 last_arrow_position = Qnil; |
14891 last_arrow_string = Qnil; | 14907 last_arrow_string = Qnil; |
14892 staticpro (&last_arrow_position); | 14908 staticpro (&last_arrow_position); |
14893 staticpro (&last_arrow_string); | 14909 staticpro (&last_arrow_string); |
14894 | 14910 |