From d964375ad3bc0ec3edbce0bfcf72a0a0d7dda426 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 25 Sep 2020 11:47:59 +0200 Subject: [PATCH] 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. --- src/process.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } -- 2.39.5