Mercurial > emacs
comparison src/process.c @ 7454:8d9e41a175fa
(exec_sentinel): Don't deactivate the mark. Check for asynch buffer switch.
| author | Karl Heuer <kwzh@gnu.org> |
|---|---|
| date | Wed, 11 May 1994 04:04:03 +0000 |
| parents | 33e5afbb62bf |
| children | cfe4840ffde9 |
comparison
equal
deleted
inserted
replaced
| 7453:9b14642f7d52 | 7454:8d9e41a175fa |
|---|---|
| 3004 | 3004 |
| 3005 static void | 3005 static void |
| 3006 exec_sentinel (proc, reason) | 3006 exec_sentinel (proc, reason) |
| 3007 Lisp_Object proc, reason; | 3007 Lisp_Object proc, reason; |
| 3008 { | 3008 { |
| 3009 Lisp_Object sentinel; | 3009 Lisp_Object sentinel, obuffer, odeactivate; |
| 3010 register struct Lisp_Process *p = XPROCESS (proc); | 3010 register struct Lisp_Process *p = XPROCESS (proc); |
| 3011 int count = specpdl_ptr - specpdl; | 3011 int count = specpdl_ptr - specpdl; |
| 3012 | 3012 |
| 3013 odeactivate = Vdeactivate_mark; | |
| 3014 obuffer = Fcurrent_buffer (); | |
| 3013 sentinel = p->sentinel; | 3015 sentinel = p->sentinel; |
| 3014 if (NILP (sentinel)) | 3016 if (NILP (sentinel)) |
| 3015 return; | 3017 return; |
| 3016 | 3018 |
| 3017 /* Zilch the sentinel while it's running, to avoid recursive invocations; | 3019 /* Zilch the sentinel while it's running, to avoid recursive invocations; |
| 3019 p->sentinel = Qnil; | 3021 p->sentinel = Qnil; |
| 3020 record_unwind_protect (exec_sentinel_unwind, Fcons (proc, sentinel)); | 3022 record_unwind_protect (exec_sentinel_unwind, Fcons (proc, sentinel)); |
| 3021 /* Inhibit quit so that random quits don't screw up a running filter. */ | 3023 /* Inhibit quit so that random quits don't screw up a running filter. */ |
| 3022 specbind (Qinhibit_quit, Qt); | 3024 specbind (Qinhibit_quit, Qt); |
| 3023 call2 (sentinel, proc, reason); | 3025 call2 (sentinel, proc, reason); |
| 3026 | |
| 3027 Vdeactivate_mark = odeactivate; | |
| 3028 if (! EQ (Fcurrent_buffer (), obuffer)) | |
| 3029 record_asynch_buffer_change (); | |
| 3030 | |
| 3024 if (waiting_for_user_input_p) | 3031 if (waiting_for_user_input_p) |
| 3025 prepare_menu_bars (); | 3032 prepare_menu_bars (); |
| 3026 unbind_to (count, Qnil); | 3033 unbind_to (count, Qnil); |
| 3027 } | 3034 } |
| 3028 | 3035 |
