bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21187: erc-kill-channel-hook sometimes is not run during /QUIT


From: Fran Litterio
Subject: bug#21187: erc-kill-channel-hook sometimes is not run during /QUIT
Date: Tue, 4 Aug 2015 17:56:23 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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)))))







reply via email to

[Prev in Thread] Current Thread [Next in Thread]