From: Lars Ingebrigtsen Date: Fri, 25 Sep 2020 09:47:59 +0000 (+0200) Subject: Tweak updating the process mark in set-process-buffer X-Git-Tag: emacs-28.0.90~5895 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d964375ad3bc0ec3edbce0bfcf72a0a0d7dda426;p=emacs.git 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. --- diff --git a/src/process.c b/src/process.c index ee8dcbbf749..50c425077a9 100644 --- a/src/process.c +++ b/src/process.c @@ -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; }