Mercurial > emacs
comparison src/process.c @ 10032:f689803caa92
Added code for automatically saving and restoring the match data
when a filter or sentinel tries to modify it.
author | Francesco Potortì <pot@gnu.org> |
---|---|
date | Mon, 21 Nov 1994 12:50:27 +0000 |
parents | 007d93b04e1f |
children | 68b8191091a7 |
comparison
equal
deleted
inserted
replaced
10031:324e027f01bc | 10032:f689803caa92 |
---|---|
2348 obuffer = Fcurrent_buffer (); | 2348 obuffer = Fcurrent_buffer (); |
2349 | 2349 |
2350 specbind (Qinhibit_quit, Qt); | 2350 specbind (Qinhibit_quit, Qt); |
2351 specbind (Qlast_nonmenu_event, Qt); | 2351 specbind (Qlast_nonmenu_event, Qt); |
2352 | 2352 |
2353 running_asynch_code = 1; | |
2353 internal_condition_case_1 (read_process_output_call, | 2354 internal_condition_case_1 (read_process_output_call, |
2354 Fcons (outstream, | 2355 Fcons (outstream, |
2355 Fcons (proc, | 2356 Fcons (proc, |
2356 Fcons (make_string (chars, nchars), | 2357 Fcons (make_string (chars, |
2358 nchars), | |
2357 Qnil))), | 2359 Qnil))), |
2358 !NILP (Vdebug_on_error) ? Qnil : Qerror, | 2360 !NILP (Vdebug_on_error) ? Qnil : Qerror, |
2359 read_process_output_error_handler); | 2361 read_process_output_error_handler); |
2362 running_asynch_code = 0; | |
2363 restore_match_data (); | |
2360 | 2364 |
2361 /* Handling the process output should not deactivate the mark. */ | 2365 /* Handling the process output should not deactivate the mark. */ |
2362 Vdeactivate_mark = odeactivate; | 2366 Vdeactivate_mark = odeactivate; |
2363 | 2367 |
2364 if (! EQ (Fcurrent_buffer (), obuffer)) | 2368 if (! EQ (Fcurrent_buffer (), obuffer)) |
3231 record_unwind_protect (exec_sentinel_unwind, Fcons (proc, sentinel)); | 3235 record_unwind_protect (exec_sentinel_unwind, Fcons (proc, sentinel)); |
3232 /* Inhibit quit so that random quits don't screw up a running filter. */ | 3236 /* Inhibit quit so that random quits don't screw up a running filter. */ |
3233 specbind (Qinhibit_quit, Qt); | 3237 specbind (Qinhibit_quit, Qt); |
3234 specbind (Qlast_nonmenu_event, Qt); | 3238 specbind (Qlast_nonmenu_event, Qt); |
3235 | 3239 |
3240 running_asynch_code = 1; | |
3236 internal_condition_case_1 (read_process_output_call, | 3241 internal_condition_case_1 (read_process_output_call, |
3237 Fcons (sentinel, | 3242 Fcons (sentinel, |
3238 Fcons (proc, Fcons (reason, Qnil))), | 3243 Fcons (proc, Fcons (reason, Qnil))), |
3239 !NILP (Vdebug_on_error) ? Qnil : Qerror, | 3244 !NILP (Vdebug_on_error) ? Qnil : Qerror, |
3240 exec_sentinel_error_handler); | 3245 exec_sentinel_error_handler); |
3246 running_asynch_code = 0; | |
3247 restore_match_data (); | |
3241 | 3248 |
3242 Vdeactivate_mark = odeactivate; | 3249 Vdeactivate_mark = odeactivate; |
3243 if (! EQ (Fcurrent_buffer (), obuffer)) | 3250 if (! EQ (Fcurrent_buffer (), obuffer)) |
3244 record_asynch_buffer_change (); | 3251 record_asynch_buffer_change (); |
3245 | 3252 |