diff options
| author | Richard M. Stallman | 1995-03-03 10:31:49 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-03-03 10:31:49 +0000 |
| commit | dfc21838c09a887ffa729c74831b968f20b71fc5 (patch) | |
| tree | b97e574b3eadcc7063cffffcbf7601198e23c4f9 /src | |
| parent | d2e9ee068c6cb19161c23da451011adadcd222cb (diff) | |
| download | emacs-dfc21838c09a887ffa729c74831b968f20b71fc5.tar.gz emacs-dfc21838c09a887ffa729c74831b968f20b71fc5.zip | |
(exec_sentinel, read_process_output): If running filter
or sentinel changes the local map, call record_asynch_buffer_change.
Diffstat (limited to 'src')
| -rw-r--r-- | src/process.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/process.c b/src/process.c index 67d1609ad9d..1230887888f 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -2329,10 +2329,13 @@ read_process_output (proc, channel) | |||
| 2329 | it up. */ | 2329 | it up. */ |
| 2330 | int count = specpdl_ptr - specpdl; | 2330 | int count = specpdl_ptr - specpdl; |
| 2331 | Lisp_Object odeactivate; | 2331 | Lisp_Object odeactivate; |
| 2332 | Lisp_Object obuffer; | 2332 | Lisp_Object obuffer, okeymap; |
| 2333 | 2333 | ||
| 2334 | /* No need to gcpro these, because all we do with them later | ||
| 2335 | is test them for EQness, and none of them should be a string. */ | ||
| 2334 | odeactivate = Vdeactivate_mark; | 2336 | odeactivate = Vdeactivate_mark; |
| 2335 | obuffer = Fcurrent_buffer (); | 2337 | XSETBUFFER (obuffer, current_buffer); |
| 2338 | okeymap = current_buffer->keymap; | ||
| 2336 | 2339 | ||
| 2337 | specbind (Qinhibit_quit, Qt); | 2340 | specbind (Qinhibit_quit, Qt); |
| 2338 | specbind (Qlast_nonmenu_event, Qt); | 2341 | specbind (Qlast_nonmenu_event, Qt); |
| @@ -2352,7 +2355,8 @@ read_process_output (proc, channel) | |||
| 2352 | /* Handling the process output should not deactivate the mark. */ | 2355 | /* Handling the process output should not deactivate the mark. */ |
| 2353 | Vdeactivate_mark = odeactivate; | 2356 | Vdeactivate_mark = odeactivate; |
| 2354 | 2357 | ||
| 2355 | if (! EQ (Fcurrent_buffer (), obuffer)) | 2358 | if (! EQ (Fcurrent_buffer (), obuffer) |
| 2359 | || ! EQ (current_buffer->keymap, okeymap)) | ||
| 2356 | record_asynch_buffer_change (); | 2360 | record_asynch_buffer_change (); |
| 2357 | 2361 | ||
| 2358 | if (waiting_for_user_input_p) | 2362 | if (waiting_for_user_input_p) |
| @@ -3206,12 +3210,16 @@ static void | |||
| 3206 | exec_sentinel (proc, reason) | 3210 | exec_sentinel (proc, reason) |
| 3207 | Lisp_Object proc, reason; | 3211 | Lisp_Object proc, reason; |
| 3208 | { | 3212 | { |
| 3209 | Lisp_Object sentinel, obuffer, odeactivate; | 3213 | Lisp_Object sentinel, obuffer, odeactivate, okeymap; |
| 3210 | register struct Lisp_Process *p = XPROCESS (proc); | 3214 | register struct Lisp_Process *p = XPROCESS (proc); |
| 3211 | int count = specpdl_ptr - specpdl; | 3215 | int count = specpdl_ptr - specpdl; |
| 3212 | 3216 | ||
| 3217 | /* No need to gcpro these, because all we do with them later | ||
| 3218 | is test them for EQness, and none of them should be a string. */ | ||
| 3213 | odeactivate = Vdeactivate_mark; | 3219 | odeactivate = Vdeactivate_mark; |
| 3214 | obuffer = Fcurrent_buffer (); | 3220 | XSETBUFFER (obuffer, current_buffer); |
| 3221 | okeymap = current_buffer->keymap; | ||
| 3222 | |||
| 3215 | sentinel = p->sentinel; | 3223 | sentinel = p->sentinel; |
| 3216 | if (NILP (sentinel)) | 3224 | if (NILP (sentinel)) |
| 3217 | return; | 3225 | return; |
| @@ -3234,7 +3242,8 @@ exec_sentinel (proc, reason) | |||
| 3234 | restore_match_data (); | 3242 | restore_match_data (); |
| 3235 | 3243 | ||
| 3236 | Vdeactivate_mark = odeactivate; | 3244 | Vdeactivate_mark = odeactivate; |
| 3237 | if (! EQ (Fcurrent_buffer (), obuffer)) | 3245 | if (! EQ (Fcurrent_buffer (), obuffer) |
| 3246 | || ! EQ (current_buffer->keymap, okeymap)) | ||
| 3238 | record_asynch_buffer_change (); | 3247 | record_asynch_buffer_change (); |
| 3239 | 3248 | ||
| 3240 | if (waiting_for_user_input_p) | 3249 | if (waiting_for_user_input_p) |