]> git.eshelyaron.com Git - emacs.git/commitdiff
Run erc-kill-channel-hook always on exit
authorFran Litterio <flitterio@gmail.com>
Sun, 27 Dec 2015 07:56:45 +0000 (08:56 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 27 Dec 2015 07:56:45 +0000 (08:56 +0100)
* lisp/erc/erc.el (erc-kill-buffer-function): Run erc-kill-channel-hook
when erc-kill-queries-on-quit is set (bug#21187).

lisp/erc/erc.el

index a66338dff02d4d1627a849efd78e696a44e90166..70e37348b6a9055982be18b92629de9cbc8f16e4 100644 (file)
@@ -6702,7 +6702,7 @@ or `erc-kill-buffer-hook' if any other buffer."
     (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)))))