From 72b054c945111f385575cfd4e678adf016b191d4 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 29 Jul 2019 00:41:56 +0200 Subject: [PATCH] Avoid error when killing rcirc buffer * lisp/net/rcirc.el (rcirc-kill-buffer-hook): Delete the process in the buffer when killing server buffers to avoid triggering errors from the sentinel (bug#23168). --- lisp/net/rcirc.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 24084c828e1..5722582ab6c 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -44,6 +44,7 @@ (require 'cl-lib) (require 'ring) (require 'time-date) +(eval-when-compile (require 'subr-x)) (defconst rcirc-id-string (concat "rcirc on GNU Emacs " emacs-version)) @@ -1181,6 +1182,8 @@ with it." rcirc-log-directory) (rcirc-log-write)) (rcirc-clean-up-buffer "Killed buffer") + (when-let ((process (get-buffer-process (current-buffer)))) + (delete-process process)) (when (and rcirc-buffer-alist ;; it's a server buffer rcirc-kill-channel-buffers) (dolist (channel rcirc-buffer-alist) -- 2.39.2