Mercurial > emacs
comparison src/process.c @ 3510:b4a552ca4e99
(read_process_output): Deactivate the mark.
Save and restore Vdeactivate_mark.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Sun, 06 Jun 1993 03:15:59 +0000 |
| parents | 0f0d9e9c33f2 |
| children | 507f64624555 |
comparison
equal
deleted
inserted
replaced
| 3509:a1ef317ceb18 | 3510:b4a552ca4e99 |
|---|---|
| 2073 { | 2073 { |
| 2074 /* We inhibit quit here instead of just catching it so that | 2074 /* We inhibit quit here instead of just catching it so that |
| 2075 hitting ^G when a filter happens to be running won't screw | 2075 hitting ^G when a filter happens to be running won't screw |
| 2076 it up. */ | 2076 it up. */ |
| 2077 int count = specpdl_ptr - specpdl; | 2077 int count = specpdl_ptr - specpdl; |
| 2078 Lisp_Object odeactivate; | |
| 2079 | |
| 2080 odeactivate = Vdeactivate_mark; | |
| 2081 | |
| 2078 specbind (Qinhibit_quit, Qt); | 2082 specbind (Qinhibit_quit, Qt); |
| 2079 call2 (outstream, proc, make_string (chars, nchars)); | 2083 call2 (outstream, proc, make_string (chars, nchars)); |
| 2080 | 2084 |
| 2085 /* Deactivate the mark now, so it doesn't happen | |
| 2086 *after* the following command. */ | |
| 2087 if (!NILP (current_buffer->mark_active)) | |
| 2088 { | |
| 2089 if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode)) | |
| 2090 { | |
| 2091 current_buffer->mark_active = Qnil; | |
| 2092 call1 (Vrun_hooks, intern ("deactivate-mark-hook")); | |
| 2093 } | |
| 2094 } | |
| 2095 Vdeactivate_mark = odeactivate; | |
| 2096 | |
| 2081 #ifdef VMS | 2097 #ifdef VMS |
| 2082 start_vms_process_read (vs); | 2098 start_vms_process_read (vs); |
| 2083 #endif | 2099 #endif |
| 2084 unbind_to (count); | 2100 unbind_to (count); |
| 2085 return nchars; | 2101 return nchars; |
| 2088 /* If no filter, write into buffer if it isn't dead. */ | 2104 /* If no filter, write into buffer if it isn't dead. */ |
| 2089 if (!NILP (p->buffer) && !NILP (XBUFFER (p->buffer)->name)) | 2105 if (!NILP (p->buffer) && !NILP (XBUFFER (p->buffer)->name)) |
| 2090 { | 2106 { |
| 2091 Lisp_Object old_read_only; | 2107 Lisp_Object old_read_only; |
| 2092 Lisp_Object old_begv, old_zv; | 2108 Lisp_Object old_begv, old_zv; |
| 2109 Lisp_Object odeactivate; | |
| 2110 | |
| 2111 odeactivate = Vdeactivate_mark; | |
| 2093 | 2112 |
| 2094 Fset_buffer (p->buffer); | 2113 Fset_buffer (p->buffer); |
| 2095 opoint = point; | 2114 opoint = point; |
| 2096 old_read_only = current_buffer->read_only; | 2115 old_read_only = current_buffer->read_only; |
| 2097 XFASTINT (old_begv) = BEGV; | 2116 XFASTINT (old_begv) = BEGV; |
| 2131 update_mode_lines++; | 2150 update_mode_lines++; |
| 2132 | 2151 |
| 2133 /* If the restriction isn't what it should be, set it. */ | 2152 /* If the restriction isn't what it should be, set it. */ |
| 2134 if (XFASTINT (old_begv) != BEGV || XFASTINT (old_zv) != ZV) | 2153 if (XFASTINT (old_begv) != BEGV || XFASTINT (old_zv) != ZV) |
| 2135 Fnarrow_to_region (old_begv, old_zv); | 2154 Fnarrow_to_region (old_begv, old_zv); |
| 2155 | |
| 2156 /* Deactivate the mark now, so it doesn't happen | |
| 2157 *after* the following command. */ | |
| 2158 if (!NILP (current_buffer->mark_active)) | |
| 2159 { | |
| 2160 if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode)) | |
| 2161 { | |
| 2162 current_buffer->mark_active = Qnil; | |
| 2163 call1 (Vrun_hooks, intern ("deactivate-mark-hook")); | |
| 2164 } | |
| 2165 } | |
| 2166 | |
| 2167 Vdeactivate_mark = odeactivate; | |
| 2136 | 2168 |
| 2137 current_buffer->read_only = old_read_only; | 2169 current_buffer->read_only = old_read_only; |
| 2138 SET_PT (opoint); | 2170 SET_PT (opoint); |
| 2139 set_buffer_internal (old); | 2171 set_buffer_internal (old); |
| 2140 } | 2172 } |
