Mercurial > emacs
comparison src/process.c @ 23460:94f4ba741f22
(exec_sentinel, read_process_output):
Restore waiting_for_user_input_p after running Lisp code.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 14 Oct 1998 14:36:33 +0000 |
parents | dc0f0b75165b |
children | 5de09eb31c38 |
comparison
equal
deleted
inserted
replaced
23459:bab640501294 | 23460:94f4ba741f22 |
---|---|
2959 int count = specpdl_ptr - specpdl; | 2959 int count = specpdl_ptr - specpdl; |
2960 Lisp_Object odeactivate; | 2960 Lisp_Object odeactivate; |
2961 Lisp_Object obuffer, okeymap; | 2961 Lisp_Object obuffer, okeymap; |
2962 Lisp_Object text; | 2962 Lisp_Object text; |
2963 int outer_running_asynch_code = running_asynch_code; | 2963 int outer_running_asynch_code = running_asynch_code; |
2964 int waiting = waiting_for_user_input_p; | |
2964 | 2965 |
2965 /* No need to gcpro these, because all we do with them later | 2966 /* No need to gcpro these, because all we do with them later |
2966 is test them for EQness, and none of them should be a string. */ | 2967 is test them for EQness, and none of them should be a string. */ |
2967 odeactivate = Vdeactivate_mark; | 2968 odeactivate = Vdeactivate_mark; |
2968 XSETBUFFER (obuffer, current_buffer); | 2969 XSETBUFFER (obuffer, current_buffer); |
2999 restore_match_data (); | 3000 restore_match_data (); |
3000 running_asynch_code = outer_running_asynch_code; | 3001 running_asynch_code = outer_running_asynch_code; |
3001 | 3002 |
3002 /* Handling the process output should not deactivate the mark. */ | 3003 /* Handling the process output should not deactivate the mark. */ |
3003 Vdeactivate_mark = odeactivate; | 3004 Vdeactivate_mark = odeactivate; |
3005 | |
3006 /* Restore waiting_for_user_input_p as it was | |
3007 when we were called, in case the filter clobbered it. */ | |
3008 waiting_for_user_input_p = waiting; | |
3004 | 3009 |
3005 #if 0 /* Call record_asynch_buffer_change unconditionally, | 3010 #if 0 /* Call record_asynch_buffer_change unconditionally, |
3006 because we might have changed minor modes or other things | 3011 because we might have changed minor modes or other things |
3007 that affect key bindings. */ | 3012 that affect key bindings. */ |
3008 if (! EQ (Fcurrent_buffer (), obuffer) | 3013 if (! EQ (Fcurrent_buffer (), obuffer) |
4112 { | 4117 { |
4113 Lisp_Object sentinel, obuffer, odeactivate, okeymap; | 4118 Lisp_Object sentinel, obuffer, odeactivate, okeymap; |
4114 register struct Lisp_Process *p = XPROCESS (proc); | 4119 register struct Lisp_Process *p = XPROCESS (proc); |
4115 int count = specpdl_ptr - specpdl; | 4120 int count = specpdl_ptr - specpdl; |
4116 int outer_running_asynch_code = running_asynch_code; | 4121 int outer_running_asynch_code = running_asynch_code; |
4122 int waiting = waiting_for_user_input_p; | |
4117 | 4123 |
4118 /* No need to gcpro these, because all we do with them later | 4124 /* No need to gcpro these, because all we do with them later |
4119 is test them for EQness, and none of them should be a string. */ | 4125 is test them for EQness, and none of them should be a string. */ |
4120 odeactivate = Vdeactivate_mark; | 4126 odeactivate = Vdeactivate_mark; |
4121 XSETBUFFER (obuffer, current_buffer); | 4127 XSETBUFFER (obuffer, current_buffer); |
4158 /* If we saved the match data nonrecursively, restore it now. */ | 4164 /* If we saved the match data nonrecursively, restore it now. */ |
4159 restore_match_data (); | 4165 restore_match_data (); |
4160 running_asynch_code = outer_running_asynch_code; | 4166 running_asynch_code = outer_running_asynch_code; |
4161 | 4167 |
4162 Vdeactivate_mark = odeactivate; | 4168 Vdeactivate_mark = odeactivate; |
4169 | |
4170 /* Restore waiting_for_user_input_p as it was | |
4171 when we were called, in case the filter clobbered it. */ | |
4172 waiting_for_user_input_p = waiting; | |
4173 | |
4163 #if 0 | 4174 #if 0 |
4164 if (! EQ (Fcurrent_buffer (), obuffer) | 4175 if (! EQ (Fcurrent_buffer (), obuffer) |
4165 || ! EQ (current_buffer->keymap, okeymap)) | 4176 || ! EQ (current_buffer->keymap, okeymap)) |
4166 #endif | 4177 #endif |
4167 /* But do it only if the caller is actually going to read events. | 4178 /* But do it only if the caller is actually going to read events. |