]> git.eshelyaron.com Git - emacs.git/commit
Improve multi-window erc-keep-place-indicator-mode
authorF. Jason Park <jp@neverwas.me>
Sat, 23 Dec 2023 20:46:33 +0000 (12:46 -0800)
committerF. Jason Park <jp@neverwas.me>
Thu, 28 Dec 2023 05:32:25 +0000 (21:32 -0800)
commit65735efdca017f2ec0aa1022b7e82f68fbe0084d
tree9e00293e01aff32fe594e43ba484a702429a0a26
parent8f571769e155a214ae2f9f760dd179b687d9982e
Improve multi-window erc-keep-place-indicator-mode

* lisp/erc/erc-goodies.el (erc-keep-place-indicator-follow): Describe
condition causing an indicator update.
(erc--keep-place-indicator-on-window-configuration-change,
erc--keep-place-indicator-on-window-buffer-change): Rename former to
latter, add required WINDOW parameter, and don't move indicator if
buffer appears in multiple windows.  Also, don't bother checking
whether either buffer is a mini because the manual says window change
functions don't run for minibuffer replacements.
(erc--keep-place-indicator-setup): Hook on
`window-buffer-change-functions' instead of
`window-configuration-change-hook'.
(erc-keep-place-mode, erc-keep-place-disable): Remove member from
`window-buffer-change-functions' instead of
`window-configuration-change-hook'.
(erc-keep-place): Use `visible' FRAME arg of `get-buffer-window'.
Don't twiddle `window-prev-buffers' when
`erc-keep-place-indicator-mode' is non-nil.  This feature was
originally introduced by bug#59943.
* test/lisp/erc/erc-goodies-tests.el
(erc-goodies-tests--assert-kp-indicator-on,
erc-goodies-tests--assert-kp-indicator-off): Update hook name.
* test/lisp/erc/erc-scenarios-keep-place-indicator.el: New file.
* test/lisp/erc/resources/keep-place/follow.eld: New file.
lisp/erc/erc-goodies.el
test/lisp/erc/erc-goodies-tests.el
test/lisp/erc/erc-scenarios-keep-place-indicator.el [new file with mode: 0644]
test/lisp/erc/resources/keep-place/follow.eld [new file with mode: 0644]