Subject: bug#77224: [PATCH] New minor mode 'cursor-indicators-mode'

From: Juri Linkov <[email-masked]>
Date: Sun, 30 Mar 2025 20:55:20 +0300

>> Please note that this is insufficient for 'repeat-mode'.
>> Currently it requires adding an advice to update the cursor
>> on the repeat timer events:
>
> I solved this problem by wrapping the `repeat-echo-function' and `after-focus-change-function'.
>
> https://gist.github.com/jdtsmith/a169362879388bc1bdf2bbb977782d4f￼

Interesting to see that you switched from `post-command-hook'
to `repeat-echo-function' and `after-focus-change-function'.

So we could have an option that allows switching between 1) idle timers,
2) 'post-command-hook', 3) a list of more specific hooks.

In any case we still need to add such a condition:

  (if (memq 'repeat-in-progress cursor-indicators-conditions)
      (add-function :after repeat-echo-function #'cursor-indicators--update-indications)
   (remove-function :after repeat-echo-function #'cursor-indicators--update-indications))

that have to be added only when the customized value contains 'repeat-in-progress'.