mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-05 11:21:04 -08:00
(read_process_output): Deactivate the mark.
Save and restore Vdeactivate_mark.
This commit is contained in:
parent
682ac5eb5b
commit
30c7817593
1 changed files with 32 additions and 0 deletions
|
|
@ -2075,9 +2075,25 @@ read_process_output (proc, channel)
|
|||
hitting ^G when a filter happens to be running won't screw
|
||||
it up. */
|
||||
int count = specpdl_ptr - specpdl;
|
||||
Lisp_Object odeactivate;
|
||||
|
||||
odeactivate = Vdeactivate_mark;
|
||||
|
||||
specbind (Qinhibit_quit, Qt);
|
||||
call2 (outstream, proc, make_string (chars, nchars));
|
||||
|
||||
/* Deactivate the mark now, so it doesn't happen
|
||||
*after* the following command. */
|
||||
if (!NILP (current_buffer->mark_active))
|
||||
{
|
||||
if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode))
|
||||
{
|
||||
current_buffer->mark_active = Qnil;
|
||||
call1 (Vrun_hooks, intern ("deactivate-mark-hook"));
|
||||
}
|
||||
}
|
||||
Vdeactivate_mark = odeactivate;
|
||||
|
||||
#ifdef VMS
|
||||
start_vms_process_read (vs);
|
||||
#endif
|
||||
|
|
@ -2090,6 +2106,9 @@ read_process_output (proc, channel)
|
|||
{
|
||||
Lisp_Object old_read_only;
|
||||
Lisp_Object old_begv, old_zv;
|
||||
Lisp_Object odeactivate;
|
||||
|
||||
odeactivate = Vdeactivate_mark;
|
||||
|
||||
Fset_buffer (p->buffer);
|
||||
opoint = point;
|
||||
|
|
@ -2134,6 +2153,19 @@ read_process_output (proc, channel)
|
|||
if (XFASTINT (old_begv) != BEGV || XFASTINT (old_zv) != ZV)
|
||||
Fnarrow_to_region (old_begv, old_zv);
|
||||
|
||||
/* Deactivate the mark now, so it doesn't happen
|
||||
*after* the following command. */
|
||||
if (!NILP (current_buffer->mark_active))
|
||||
{
|
||||
if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode))
|
||||
{
|
||||
current_buffer->mark_active = Qnil;
|
||||
call1 (Vrun_hooks, intern ("deactivate-mark-hook"));
|
||||
}
|
||||
}
|
||||
|
||||
Vdeactivate_mark = odeactivate;
|
||||
|
||||
current_buffer->read_only = old_read_only;
|
||||
SET_PT (opoint);
|
||||
set_buffer_internal (old);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue