Speedbar: no more stale idle timers (bug#81561)

* lisp/dframe.el (dframe-set-timer): Fixed the condition for removing
the timer (the code does not match what is written in the comment).
* lisp/speedbar.el (speedbar-window--close): 'speedbar-set-timer' must
be called from the 'speedbar-buffer'.
This commit is contained in:
Vincenzo Pupillo 2026-08-08 23:08:53 +02:00 committed by Eli Zaretskii
parent c9cedb4e11
commit a56e964941
2 changed files with 3 additions and 2 deletions

View file

@ -652,7 +652,7 @@ who requested the timer. NULL-ON-ERROR is ignored."
timeout
;; We have a timer, an off is requested, and no client
;; functions are left, shut er down.
(and dframe-timer (not timeout) dframe-client-functions))
(and dframe-timer (not timeout) (not dframe-client-functions)))
;; Only call the low level function if we are changing the state.
(dframe-set-timer-internal timeout)))

View file

@ -1123,7 +1123,8 @@ supported at a time.
(setq speedbar--window nil
speedbar-frame nil
dframe-attached-frame nil)
(speedbar-set-timer nil)
(with-current-buffer speedbar-buffer
(speedbar-set-timer nil))
(kill-buffer speedbar-buffer)
(setq speedbar-buffer nil)
(when (and current-window (window-live-p current-window))