GNU bug report logs -
#21187
erc-kill-channel-hook sometimes is not run during /QUIT
Previous Next
Reported by: Fran Litterio <flitterio <at> gmail.com>
Date: Tue, 4 Aug 2015 17:57:01 UTC
Severity: normal
Tags: fixed
Fixed in version 25.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Using Emacs built from the latest sources, when variable
erc-kill-queries-on-quit is t (which causes ERC to kill channel
buffers when quitting -- yes, the name is misleading), a /QUIT
does not run the hooks on erc-kill-channel-hook, because
erc-default-target returns nil due to the server being
disconnected.
This patch fixes that by falling back to examining the buffer
name, which should be safe to do since we know the major mode is
erc-mode.
--
Fran
flitterio <at> gmail.com
--- erc.el.orig 2015-08-04 13:38:04.602900800 -0400
+++ erc.el 2015-08-04 13:38:56.538768600 -0400
@@ -6698,7 +6698,7 @@
(cond
((eq (erc-server-buffer) (current-buffer))
(run-hooks 'erc-kill-server-hook))
- ((erc-channel-p (erc-default-target))
+ ((erc-channel-p (or (erc-default-target) (buffer-name)))
(run-hooks 'erc-kill-channel-hook))
(t
(run-hooks 'erc-kill-buffer-hook)))))
This bug report was last modified 9 years and 150 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.