[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Q: How to programatically terminate repeat-mode
From: |
T.V Raman |
Subject: |
Re: Q: How to programatically terminate repeat-mode |
Date: |
Mon, 3 Oct 2022 07:20:45 -0700 |
yes, API-wise, repeat-mode providing a programmatic means of turning
off a repeat would be best; also I dont think there is a way for a
user to have multiple repeats active, which makes things simpler.
Stefan Monnier writes:
> 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
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
- 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, 2022/10/03
- Re: Q: How to programatically terminate repeat-mode,
T.V Raman <=
- 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