diff options
| author | Richard M. Stallman | 1993-06-06 03:15:59 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-06-06 03:15:59 +0000 |
| commit | 30c7817593feb864754c22bff5bc8d161cd3bf22 (patch) | |
| tree | 0723af35a3b5f2c716063efeb38bff7e79ab49b0 /src/process.c | |
| parent | 682ac5eb5b71f0980594cee295f14d8ce89723c6 (diff) | |
| download | emacs-30c7817593feb864754c22bff5bc8d161cd3bf22.tar.gz emacs-30c7817593feb864754c22bff5bc8d161cd3bf22.zip | |
(read_process_output): Deactivate the mark.
Save and restore Vdeactivate_mark.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c index 7bada8607c7..91e411eff65 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -2075,9 +2075,25 @@ read_process_output (proc, channel) | |||
| 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 |
| @@ -2090,6 +2106,9 @@ read_process_output (proc, channel) | |||
| 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; |
| @@ -2134,6 +2153,19 @@ read_process_output (proc, channel) | |||
| 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); |
| 2136 | 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; | ||
| 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); |