GNU bug report logs -
#22099
Path to fix bug in function erc-kill-query-buffers
Previous Next
Reported by: Francis Litterio <flitterio <at> gmail.com>
Date: Sun, 6 Dec 2015 01:15:03 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 25.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In the latest Emacs sources (Git branch "master"), function
erc-kill-query-buffers fails to protect against being passed nil
for argument PROCESS, which causes all channel buffers on all
servers to be deleted! This can happen if command /QUIT is issued
in a disconnected server buffer and variable erc-kill-queries-on-quit
is non-nil.
This patch fixes this problem.
--
Fran
flitterio <at> gmail.com
--- erc.el~ 2015-08-09 16:04:46.097043200 -0400
+++ erc.el 2015-08-09 16:07:19.082925200 -0400
@@ -6071,13 +6071,14 @@
(or (file-accessible-directory-p dir) (error "Cannot access %s" dir)))
(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
;; "selecting killed buffers" b0rkage.
- (erc-with-all-buffers-of-server process
- (lambda ()
- (not (erc-server-buffer-p)))
- (kill-buffer (current-buffer))))
+ (if (processp process)
+ (erc-with-all-buffers-of-server process
+ (lambda ()
+ (not (erc-server-buffer-p)))
+ (kill-buffer (current-buffer))))
(defun erc-nick-at-point ()
"Give information about the nickname at `point'.
This bug report was last modified 9 years and 104 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.