Tweak updating the process mark in set-process-buffer

* src/process.c (Fset_process_buffer): Only update the process
mark if we actually change the buffer.
This commit is contained in:
Lars Ingebrigtsen 2020-09-25 11:47:59 +02:00
parent d067ac5b9e
commit d964375ad3

View file

@ -1227,11 +1227,14 @@ Return BUFFER. */)
if (!NILP (buffer))
CHECK_BUFFER (buffer);
p = XPROCESS (process);
pset_buffer (p, buffer);
if (!EQ (p->buffer, buffer))
{
pset_buffer (p, buffer);
update_process_mark (p);
}
if (NETCONN1_P (p) || SERIALCONN1_P (p) || PIPECONN1_P (p))
pset_childp (p, Fplist_put (p->childp, QCbuffer, buffer));
setup_process_coding_systems (process);
update_process_mark (p);
return buffer;
}