Make /QUIT in erc more robust

* lisp/erc/erc.el (erc-kill-query-buffers): Don't bug out if we're
issuing /QUIT to disconnected servers (bug#22099).
This commit is contained in:
Francis Litterio 2016-02-04 16:55:01 +11:00 committed by Lars Ingebrigtsen
parent d93d2c5b16
commit 8c562b2d7f

View file

@ -6083,13 +6083,15 @@ If it doesn't exist, create it."
(or (file-accessible-directory-p dir) (error "Cannot access %s" dir))) (or (file-accessible-directory-p dir) (error "Cannot access %s" dir)))
(defun erc-kill-query-buffers (process) (defun erc-kill-query-buffers (process)
"Kill all buffers of PROCESS." "Kill all buffers of PROCESS.
Does nothing if PROCESS is not a process object."
;; here, we only want to match the channel buffers, to avoid ;; here, we only want to match the channel buffers, to avoid
;; "selecting killed buffers" b0rkage. ;; "selecting killed buffers" b0rkage.
(erc-with-all-buffers-of-server process (when (processp process)
(lambda () (erc-with-all-buffers-of-server process
(not (erc-server-buffer-p))) (lambda ()
(kill-buffer (current-buffer)))) (not (erc-server-buffer-p)))
(kill-buffer (current-buffer)))))
(defun erc-nick-at-point () (defun erc-nick-at-point ()
"Give information about the nickname at `point'. "Give information about the nickname at `point'.