mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-28 07:45:00 +00:00
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.
This commit is contained in:
parent
922ad23840
commit
7c47d6c52d
@ -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'."
|
||||
|
Loading…
Reference in New Issue
Block a user