]> git.eshelyaron.com Git - emacs.git/commit
Use global window hook for erc-keep-place-indicator
authorF. Jason Park <jp@neverwas.me>
Tue, 2 Jan 2024 07:18:54 +0000 (23:18 -0800)
committerEshel Yaron <me@eshelyaron.com>
Mon, 8 Jan 2024 21:53:46 +0000 (22:53 +0100)
commitf77e300a5b2b967af4464068f26457dd4ef58c0e
tree60e94e1837d6d8ea875497155f00c75ed1a578c1
parent4a36f28f634310c982bf4a24bf92aa1fdf25b5f5
Use global window hook for erc-keep-place-indicator

* lisp/erc/erc-goodies.el
(erc--keep-place-indicator-on-window-buffer-change): Expect a frame
instead of a window argument for the only parameter, which is now
ignored, and exit early when entering a minibuffer.
(erc--keep-place-indicator-setup): Remove function because local
modules don't need a separate setup function.
(erc-keep-place-indicator-mode): Add autoload cookie even though this
is a local module, since this particular one is intended for more
granular, interactive activation.  This is mostly a formality because
it only matters in the unlikely event `erc-modules' is missing all
other modules defined in `erc-goodies'.
(erc-keep-place-indicator-mode, erc-keep-place-indicator-enable,
erc-keep-place-indicator-disable): Move functionality from
`erc--keep-place-indicator-setup' into enable body.  Use global
instead of local members for `erc-keep-place-mode-hook' and
`window-buffer-change-functions'.
(erc--keep-place-indicator-on-global-module): Perform necessary action
in all ERC buffers, not just the current one, where the user has
ostensibly disabled `erc-keep-place-mode'.
* test/lisp/erc/erc-goodies-tests.el
(erc-goodies-tests--assert-kp-indicator-on,
erc-goodies-tests--assert-kp-indicator-off): Change expected hook
membership for dependencies from global to local.
(erc-goodies-tests--keep-place-indicator): Use new helpers from
the `erc-tests-common' library.  (Bug#59943)

(cherry picked from commit fad2d1e2acc12cf8b1770d821738d924105acd8a)
lisp/erc/erc-goodies.el
test/lisp/erc/erc-goodies-tests.el