mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
Run module setup in ERC query buffers on reconnect
* etc/ERC-NEWS: Mention change. * lisp/erc/erc.el (erc-connection-established): Apply `erc--open-target' to all existing query buffers after they've been reassociated by the erc-networks logic.
This commit is contained in:
parent
606c0b22e4
commit
ec7a5f85c9
2 changed files with 16 additions and 3 deletions
|
|
@ -16,6 +16,12 @@ GNU Emacs since Emacs version 22.1.
|
|||
|
||||
** Changes in the library API.
|
||||
|
||||
*** Module setup runs in query buffers on reconnect.
|
||||
A module's setup would always run in channel buffers on reconnect, due
|
||||
to channels being rejoined, but query buffers lacked a similar
|
||||
opportunity to reinitialize their state for the new session. This is no
|
||||
longer the case.
|
||||
|
||||
*** Local modules activate in preferred order instead of in reverse.
|
||||
In recent versions, ERC has enabled local modules in the reverse order
|
||||
of that produced by the "set" function used by 'setopt' and the Custom
|
||||
|
|
|
|||
|
|
@ -6840,9 +6840,16 @@ See also: `erc-echo-notice-in-user-buffers',
|
|||
(erc-update-mode-line)
|
||||
(erc-set-initial-user-mode nick buffer)
|
||||
(erc-server-setup-periodical-ping buffer)
|
||||
;; Run mode hooks on all reclaimed query buffers.
|
||||
(let ((buffer (current-buffer))
|
||||
(erc-join-buffer 'bury)
|
||||
erc-active-buffer)
|
||||
(erc-with-all-buffers-of-server erc-server-process
|
||||
#'erc-query-buffer-p
|
||||
(let ((target (erc-target)))
|
||||
(with-current-buffer buffer
|
||||
(erc--open-target target)))
|
||||
(when erc-unhide-query-prompt
|
||||
(erc-with-all-buffers-of-server erc-server-process nil
|
||||
(when (and erc--target (not (erc--target-channel-p erc--target)))
|
||||
(erc--unhide-prompt))))
|
||||
(run-hook-with-args 'erc-after-connect server nick)))))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue