unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#60353: 30.0.50; Make `repeat-echo-function` as a LIST of functions
@ 2022-12-27 10:12 Ramesh Nedunchezian
  2022-12-27 18:03 ` Juri Linkov
  0 siblings, 1 reply; 3+ messages in thread
From: Ramesh Nedunchezian @ 2022-12-27 10:12 UTC (permalink / raw)
  To: 60353; +Cc: Juri Linkov

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)))))












^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#60353: 30.0.50; Make `repeat-echo-function` as a LIST of functions
  2022-12-27 10:12 bug#60353: 30.0.50; Make `repeat-echo-function` as a LIST of functions Ramesh Nedunchezian
@ 2022-12-27 18:03 ` Juri Linkov
  2022-12-28 17:59   ` Juri Linkov
  0 siblings, 1 reply; 3+ messages in thread
From: Juri Linkov @ 2022-12-27 18:03 UTC (permalink / raw)
  To: Ramesh Nedunchezian; +Cc: 60353

> 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)))))





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#60353: 30.0.50; Make `repeat-echo-function` as a LIST of functions
  2022-12-27 18:03 ` Juri Linkov
@ 2022-12-28 17:59   ` Juri Linkov
  0 siblings, 0 replies; 3+ messages in thread
From: Juri Linkov @ 2022-12-28 17:59 UTC (permalink / raw)
  To: Ramesh Nedunchezian; +Cc: 60353

close 60353 30.0.50
thanks

>> 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.
>
> 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)))))

I added a hint that suggests to use `add-function`
in the docstring of `repeat-echo-function`.
So probably this report could closed now.
It could be reopened if you have more questions.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-28 17:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-27 10:12 bug#60353: 30.0.50; Make `repeat-echo-function` as a LIST of functions Ramesh Nedunchezian
2022-12-27 18:03 ` Juri Linkov
2022-12-28 17:59   ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).