bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60353: 30.0.50; Make `repeat-echo-function` as a LIST of functions


From: Juri Linkov
Subject: bug#60353: 30.0.50; Make `repeat-echo-function` as a LIST of functions
Date: Tue, 27 Dec 2022 20:03:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

> I need some visual cues for when I am in "repeat-mode".
>
> For example, down below I change the cursor shape and colour depending
>
> Right now `repeat-echo-function` is NOT a list.  This means that I
> LOSE the ability to see the repeatabe keys in the echo area.
>
> If `repeat-echo-function` is SOMEHOW repelaced with a list of
> functions, I can have BOTH the cues for repeatable state--the echo
> area message, and the cursor shape.
>
> (setq repeat-echo-function
>       (defun my-repeat-echo-function (keymap)
>     (cond
>      (keymap
>       (set-cursor-color "black")
>       (setq cursor-type '(hbar . 7)))
>      (t
>       (set-cursor-color "red")
>       (setq cursor-type t)))))

A list of functions could be supported as well.
Until it's implemented you could use `add-function`
with something like this:

(add-function
 :after repeat-echo-function
 (defun my-repeat-echo-function (keymap)
   (cond
    (keymap
     (set-cursor-color "black")
     (setq cursor-type '(hbar . 7)))
    (t
     (set-cursor-color "red")
     (setq cursor-type t)))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]