[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 7c47d6c52d 18/25: Register erc-kill-buffer-function locally
From: |
F. Jason Park |
Subject: |
master 7c47d6c52d 18/25: Register erc-kill-buffer-function locally |
Date: |
Thu, 30 Jun 2022 18:29:54 -0400 (EDT) |
branch: master
commit 7c47d6c52d70225334444947824b40ad9f593c31
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. 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 18a353ae49..cbb0c9f4b4 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1591,6 +1591,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
@@ -7111,9 +7112,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'."
- master ecafe1cbb5 10/25: Recognize ASCII and strict CASEMAPPINGs in ERC, (continued)
- master ecafe1cbb5 10/25: Recognize ASCII and strict CASEMAPPINGs in ERC, F. Jason Park, 2022/06/30
- master 752e860db4 16/25: Address long-standing ERC buffer-naming issues, F. Jason Park, 2022/06/30
- master 85c2f3bc3e 25/25: Update ERC's Info doc with network-ID related changes, F. Jason Park, 2022/06/30
- master 54414ec846 02/25: Initialize erc-server-filter-data in erc-backend, F. Jason Park, 2022/06/30
- master 4e312c07f7 11/25: Make ERC respect spaces in server passwords, F. Jason Park, 2022/06/30
- master 485b84cb7c 08/25: Require erc-networks in erc.el, F. Jason Park, 2022/06/30
- master c356f86b51 09/25: Update ISUPPORT handling in ERC, F. Jason Park, 2022/06/30
- master 1c24af0fcb 12/25: Add helper to determine local channels in ERC, F. Jason Park, 2022/06/30
- master 529e46f128 13/25: Add eventual replacement for erc-default-recipients, F. Jason Park, 2022/06/30
- master 1767b0bd7e 19/25: Don't call erc-auto-query twice on PRIVMSG, F. Jason Park, 2022/06/30
- master 7c47d6c52d 18/25: Register erc-kill-buffer-function locally,
F. Jason Park <=
- master 10237840d0 24/25: Optionally prevent sending multiline input in ERC, F. Jason Park, 2022/06/30
- master 9be08ceb31 15/25: Add ERC test server and related resources, F. Jason Park, 2022/06/30
- master 922ad23840 17/25: Add user-oriented test scenarios for ERC, F. Jason Park, 2022/06/30
- master e958a2b726 14/25: Discourage ill-defined use of buffer targets in ERC, F. Jason Park, 2022/06/30
- master 959fbcf34b 20/25: Favor network identities in erc-join, F. Jason Park, 2022/06/30
- master a9d89d083a 22/25: Fix regression in erc-send-input-line, F. Jason Park, 2022/06/30
- master 0590224343 21/25: Standardize auth-source queries in ERC, F. Jason Park, 2022/06/30
- master f46547294d 23/25: Improve ERC's handling of multiline prompt input, F. Jason Park, 2022/06/30