From: Lars Ingebrigtsen Date: Sun, 28 Jul 2019 22:41:56 +0000 (+0200) Subject: Avoid error when killing rcirc buffer X-Git-Tag: emacs-27.0.90~1817^2~39 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=72b054c945111f385575cfd4e678adf016b191d4;p=emacs.git 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). --- 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)