all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Fran Litterio <flitterio@gmail.com>
To: 21187@debbugs.gnu.org
Subject: bug#21187: erc-kill-channel-hook sometimes is not run during /QUIT
Date: Tue, 4 Aug 2015 17:56:23 +0000 (UTC)	[thread overview]
Message-ID: <loom.20150804T194039-692@post.gmane.org> (raw)

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	other threads:[~2015-08-04 17:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04 17:56 Fran Litterio [this message]
2015-12-27  7:57 ` bug#21187: erc-kill-channel-hook sometimes is not run during /QUIT Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20150804T194039-692@post.gmane.org \
    --to=flitterio@gmail.com \
    --cc=21187@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.