Subject: Re: bug#17772: [PATCH] Dangling channels' buffer

From: Daimrod <[email-masked]>
Date: Sat, 14 Jun 2014 10:20:07 +0900

Daimrod <[email-masked]> writes:

> Stefan Monnier <[email-masked]> writes:
>
>>> server process when it existed, or nil. However, since a78d87e7ed it
>>> raises an error.
>>
>> Please avoid using Git references until we actually switch to Git.
>> Use dates, for example, instead.
>
> Ok, I'll keep this in mind.

Here is a new patch with your proposal:

>From af9d16684d8449cfb006f70c4c2c1fe228e737fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= <[email-masked]>
Date: Sat, 14 Jun 2014 10:10:59 +0900
Subject: [PATCH] * lisp/net/rcirc.el (rcirc-buffer-process): Return the
 process   associated with the channel, or nil if it doesn't exit.

Since 2014-04-09, the current behavior was to raise an error if the
process didn't exist. This restore the previous behavior.
---
 lisp/net/rcirc.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 41cc002..73a6395 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -803,10 +803,10 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
   "Return the process associated with channel BUFFER.
 With no argument or nil as argument, use the current buffer."
   (let ((buffer (or buffer (if (buffer-live-p rcirc-server-buffer)
-			       rcirc-server-buffer
-			     (error "Server buffer deleted")))))
-    (or (with-current-buffer buffer rcirc-process)
-	rcirc-process)))
+			       rcirc-server-buffer))))
+    (if buffer
+        (with-current-buffer buffer rcirc-process)
+      rcirc-process)))
 
 (defun rcirc-server-name (process)
   "Return PROCESS server name, given by the 001 response."
-- 
1.8.0.2722.gc0242e5

-- 
Daimrod/Greg