Subject: bug#47566: 28.0.50; diff-hl should use `repeat-mode' ... and not `smartrep'

From: Ramesh Nedunchezian <[email-masked]>
Date: Sat, 10 Apr 2021 14:08:50 +0530

On 10/04/21 7:10 am, Dmitry Gutov wrote:

> (*) Though the first impression, in comparison, was that it is too chatty. The hints are definitely helpful for discovery at first, though.
> 
> Maybe something like this would be an improvement? Experimental code warning.
> 
> diff --git a/lisp/repeat.el b/lisp/repeat.el
> index b3c58f2f81..e704e4da56 100644
> --- a/lisp/repeat.el
> +++ b/lisp/repeat.el
> @@ -404,7 +404,7 @@ repeat-post-hook
>                                         (key-description repeat-exit-key))
>                               ""))))
>                  (if (current-message)
> -                    (message "%s [%s]" (current-message) mess)
> +                    (message #("%s [%s]" 3 7 (face deemphasized)) (current-message) mess)
>                    (message mess))))
> 
>              ;; Adding an exit key

I created a repeat map for rectangle commands, and the echo area
becomes much more chattier. See
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47688.

It seems to me that repeat-mode is essentially a poor man's hydra.
May be the the symbol that holds the repeat map can specify a
`:help'-er property.

This `:help'-er can either

(a) give a fancy help string which the `repet-mode' can display in a
    pop-up

or

(b) the helper itself can prepare the string and arrange for providing
    a pop-up.

What I am saying is let the repeat map provide it's own `:help'-er
which the `repeat-mode' can hook in to.