[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Q: How to programatically terminate repeat-mode
From: |
Stefan Monnier |
Subject: |
Re: Q: How to programatically terminate repeat-mode |
Date: |
Mon, 03 Oct 2022 08:48:21 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Juri Linkov [2022-10-03 09:56:32] wrote:
>> 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:
I don't see any need to add some weird `run-function` arg to
`cancel-timer`, here.
Why can't the repeat-map code offer a function to ... "programatically
terminate repeat-mode"? Since it set up the timer, it can know what
function the timer will run and with what args and can thus run that
same code if it wants to.
Stefan
- 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, 2022/10/03
- Re: Q: How to programatically terminate repeat-mode,
Stefan Monnier <=
- 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