diff options
author | F. Jason Park <jp@neverwas.me> | 2023-08-15 21:14:07 -0700 |
---|---|---|
committer | F. Jason Park <jp@neverwas.me> | 2023-08-25 14:47:07 -0700 |
commit | f8b710e54fb8b29f39bf021ccfb993f881b0134a (patch) | |
tree | 435c1b92b93ed066e5f36ccf08eeb877f20c74d9 /test/lisp/erc/resources | |
parent | b93757029c9d8a7e401f7eeb0bc32ca508c212ee (diff) | |
download | emacs-f8b710e54fb8b29f39bf021ccfb993f881b0134a.tar.gz emacs-f8b710e54fb8b29f39bf021ccfb993f881b0134a.tar.bz2 emacs-f8b710e54fb8b29f39bf021ccfb993f881b0134a.zip |
Prevent unwanted recursion in erc-nickbar-disable
* lisp/erc/erc-speedbar.el (erc-status-sidebar-mode--unhook): Remove
forward declaration.
(erc-speedbar--toggle-nicknames-sidebar): Inline
`erc-speedbar-close-nicknames-window'. Don't call
`erc-speedbar-browser' and thus avoid adding excess timers.
(erc-speedbar--ensure): Inline `speedbar-enable-update' to avoid
unneeded call to `speedbar-set-timer', and ensure it only runs in
`speedbar-buffer'.
(erc-speedbar--shutting-down-p): New flag variable to avoid recursive
calls to `dframe-close-frame' and friends.
(erc-nickbar-mode, erc-nickbar-enable, erc-nickbar-disable): Move
logic formerly performed by `speedbar-disable-update' to
`erc-speedbar--toggle-nicknames-sidebar'. When disabling, guard
against recursive calls to `dframe-close-frame' and friends.
(erc-speedbar--get-timers): New utility function, also for use in
testing.
(erc-speedbar--dframe-controlled): Bind
`erc-speedbar--shutting-down-p' flag non-nil around call to
`erc-nickbar-mode'. Remove excess timer left behind due to
incompatible behavior from `dframe-close-frame'. Let caller kill
buffer.
(erc-speedbar-close-nicknames-window): Remove unused command, new in
ERC 5.6 and Emacs 30.
* test/lisp/erc/erc-scenarios-status-sidebar.el
(erc-speedbar-close-nicknames-window): Remove forward declaration.
(erc-speedbar--get-timers): Add forward declaration.
(erc-scenarios-status-sidebar--nickbar): Fix faulty expectations of
desired behavior when disabling module. Ensure timers canceled.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--make-bindings): Shadow `timer-idle-list' to
avoid polluting global test environment with stray timers.
(Bug#63595)
Diffstat (limited to 'test/lisp/erc/resources')
-rw-r--r-- | test/lisp/erc/resources/erc-scenarios-common.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/lisp/erc/resources/erc-scenarios-common.el b/test/lisp/erc/resources/erc-scenarios-common.el index 972faa5c73f..2eb040d28d9 100644 --- a/test/lisp/erc/resources/erc-scenarios-common.el +++ b/test/lisp/erc/resources/erc-scenarios-common.el @@ -122,6 +122,7 @@ (inhibit-interaction t) (auth-source-do-cache nil) (timer-list (copy-sequence timer-list)) + (timer-idle-list (copy-sequence timer-idle-list)) (erc-auth-source-parameters-join-function nil) (erc-autojoin-channels-alist nil) (erc-server-auto-reconnect nil) |