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: Lars Ingebrigtsen
Subject: bug#21187: erc-kill-channel-hook sometimes is not run during /QUIT
Date: Sun, 27 Dec 2015 08:57:41 +0100
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux)

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 via email to

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