[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fix/bug-48598 a999ff61fa 19/27: Register erc-kill-buffer-function locall
From: |
F. Jason Park |
Subject: |
fix/bug-48598 a999ff61fa 19/27: Register erc-kill-buffer-function locally |
Date: |
Fri, 8 Apr 2022 03:06:51 -0400 (EDT) |
branch: fix/bug-48598
commit a999ff61fa271872894e61f9d6fb2b71b5809bf3
Author: F. Jason Park <jp@neverwas.me>
Commit: F. Jason Park <jp@neverwas.me>
Register erc-kill-buffer-function locally
* lisp/erc/erc.el (erc-kill-buffer-function): don't add hook when
loading file. Not that it matters, but this would run twice because
of the erc{-backend} dependency cycle. Move to major-mode setup and
make buffer-local instead. Depends on tests in Bug#48598.
---
lisp/erc/erc.el | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 510fa2c8a8..d54a94bd38 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1569,6 +1569,7 @@ Defaults to the server buffer."
(setq-local paragraph-start
(concat "\\(" (regexp-quote (erc-prompt)) "\\)"))
(setq-local completion-ignore-case t)
+ (add-hook 'kill-buffer-hook #'erc-kill-buffer-function nil t)
(add-hook 'completion-at-point-functions #'erc-complete-word-at-point nil t))
;; activation
@@ -7060,9 +7061,6 @@ See also `format-spec'."
;;; Various hook functions
-;; FIXME: Don't set the hook globally!
-(add-hook 'kill-buffer-hook #'erc-kill-buffer-function)
-
(defcustom erc-kill-server-hook '(erc-kill-server
erc-networks-shrink-ids-and-buffer-names)
"Invoked whenever a live server buffer is killed via `kill-buffer'."
- branch fix/bug-48598 created (now ab2d93e564), F. Jason Park, 2022/04/08
- fix/bug-48598 b16a07dce1 03/27: Accept user keyword arg in ERC entry-point commands, F. Jason Park, 2022/04/08
- fix/bug-48598 8b7760d301 07/27: Allow exemption from flood penalty in erc-backend, F. Jason Park, 2022/04/08
- fix/bug-48598 57eedf46ae 04/27: Add some ERC test helpers, F. Jason Park, 2022/04/08
- fix/bug-48598 911481d449 13/27: Add helper to determine local channels in ERC, F. Jason Park, 2022/04/08
- fix/bug-48598 eee86bc7d7 16/27: Add ERC test server and related resources, F. Jason Park, 2022/04/08
- fix/bug-48598 7cb4eec8a1 23/27: SQUASH-ME: Add ERC test scenarios for identity-aware autojoin, F. Jason Park, 2022/04/08
- fix/bug-48598 447bc23d7b 21/27: SQUASH-ME: Add ERC scenarios for identity-aware msg handlers, F. Jason Park, 2022/04/08
- fix/bug-48598 a999ff61fa 19/27: Register erc-kill-buffer-function locally,
F. Jason Park <=
- fix/bug-48598 e0bf4383d7 24/27: Standardize auth-source queries in ERC, F. Jason Park, 2022/04/08
- fix/bug-48598 1978c3178c 10/27: Update ISUPPORT handling in ERC, F. Jason Park, 2022/04/08
- fix/bug-48598 6ee4329b46 02/27: Initialize erc-server-filter-data in erc-backend, F. Jason Park, 2022/04/08
- fix/bug-48598 3c6694d114 20/27: Don't call erc-auto-query twice on PRIVMSG, F. Jason Park, 2022/04/08
- fix/bug-48598 50b3aa88fc 11/27: Recognize ascii and strict CASEMAPPINGs in ERC, F. Jason Park, 2022/04/08
- fix/bug-48598 f9794dea43 15/27: Discourage ill-defined use of buffer targets in ERC, F. Jason Park, 2022/04/08
- fix/bug-48598 bb117dfacb 05/27: [SQUASH-ME] Remove duplicate ERC prompt on reconnect, F. Jason Park, 2022/04/08
- fix/bug-48598 c25371f9d7 08/27: Don't set erc-server-announced-name unless known, F. Jason Park, 2022/04/08
- fix/bug-48598 8558f9434a 12/27: Make ERC respect spaces in server passwords, F. Jason Park, 2022/04/08
- fix/bug-48598 a9ef01ec76 06/27: Customize displaying of ERC buffers on reconnect, F. Jason Park, 2022/04/08