all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Fran Litterio <flitterio@gmail.com>
Cc: 21187@debbugs.gnu.org
Subject: bug#21187: erc-kill-channel-hook sometimes is not run during /QUIT
Date: Sun, 27 Dec 2015 08:57:41 +0100	[thread overview]
Message-ID: <87d1tsiaru.fsf@gnus.org> (raw)
In-Reply-To: <loom.20150804T194039-692@post.gmane.org> (Fran Litterio's message of "Tue, 4 Aug 2015 17:56:23 +0000 (UTC)")

Fran Litterio <flitterio@gmail.com> writes:

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

Thanks; applied to Emacs 25.1.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      reply	other threads:[~2015-12-27  7:57 UTC|newest]

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

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=87d1tsiaru.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=21187@debbugs.gnu.org \
    --cc=flitterio@gmail.com \
    /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.