diff options
| author | Francesco Potortì | 1994-11-21 12:50:27 +0000 |
|---|---|---|
| committer | Francesco Potortì | 1994-11-21 12:50:27 +0000 |
| commit | 7074fde6640c88db886be0fcc4182e3790936d7d (patch) | |
| tree | ebcb295249beee68ca1d0f0274e190875c79931b /src/process.c | |
| parent | 827342364655e5ac2ae80d9b34b8abb20c186a0f (diff) | |
| download | emacs-7074fde6640c88db886be0fcc4182e3790936d7d.tar.gz emacs-7074fde6640c88db886be0fcc4182e3790936d7d.zip | |
Added code for automatically saving and restoring the match data
when a filter or sentinel tries to modify it.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c index db4b31ad57c..526f46f0db2 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -2350,13 +2350,17 @@ read_process_output (proc, channel) | |||
| 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; |
| @@ -3233,11 +3237,14 @@ exec_sentinel (proc, reason) | |||
| 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)) |