]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak updating the process mark in set-process-buffer
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 25 Sep 2020 09:47:59 +0000 (11:47 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 25 Sep 2020 09:47:59 +0000 (11:47 +0200)
* src/process.c (Fset_process_buffer): Only update the process
mark if we actually change the buffer.

src/process.c

index ee8dcbbf749ae48aaf8bd7786ef6a62ae9a6b231..50c425077a9fe6f3275f1b799e319f99df8a78ef 100644 (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;
 }