[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Q: How to programatically terminate repeat-mode
From: |
Juri Linkov |
Subject: |
Re: Q: How to programatically terminate repeat-mode |
Date: |
Mon, 03 Oct 2022 09:56:32 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
> Replacing the earlier (push 7 unread-command-events)
> with
> (when repeat-exit-timer
> (timer-set-idle-time repeat-exit-timer 0))
>
> in my disable-repeat function that I called from the process-sentinel of
> the media player -- with check for exit as the guard condition has no
> effect and the repeat remains in effect.
Maybe you are starting multiple timers? Currently repeat-mode cancels
all previously started timers, but unfortunately cancel-timer for
repeat-exit-timer doesn't run its timer function that should exit
the repeat map. I propose to add a new optional argument RUN-FUNCTION
to cancel-timer, that will run the timer function after canceling the timer.
This means copying this part of timer-event-handler to cancel-timer:
(save-current-buffer
(apply (timer--function timer) (timer--args timer)))
- Re: Q: How to programatically terminate repeat-mode, T.V Raman, 2022/10/02
- Re: Q: How to programatically terminate repeat-mode, T.V Raman, 2022/10/02
- Re: Q: How to programatically terminate repeat-mode, Juri Linkov, 2022/10/02
- Re: Q: How to programatically terminate repeat-mode, T.V Raman, 2022/10/02
- Re: Q: How to programatically terminate repeat-mode,
Juri Linkov <=
- Re: Q: How to programatically terminate repeat-mode, Stefan Monnier, 2022/10/03
- Re: Q: How to programatically terminate repeat-mode, T.V Raman, 2022/10/03
- Re: Q: How to programatically terminate repeat-mode, Juri Linkov, 2022/10/03
- Re: Q: How to programatically terminate repeat-mode, T.V Raman, 2022/10/03
- Re: Q: How to programatically terminate repeat-mode, T.V Raman, 2022/10/03
- Re: Q: How to programatically terminate repeat-mode, T.V Raman, 2022/10/03