all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
Cc: 60353@debbugs.gnu.org
Subject: bug#60353: 30.0.50; Make `repeat-echo-function` as a LIST of functions
Date: Tue, 27 Dec 2022 20:03:33 +0200	[thread overview]
Message-ID: <868ritc4tu.fsf@mail.linkov.net> (raw)
In-Reply-To: <TY2PR0101MB3693B88FE92455E6DE6971D3DAED9@TY2PR0101MB3693.apcprd01.prod.exchangelabs.com> (Ramesh Nedunchezian's message of "Tue, 27 Dec 2022 15:42:29 +0530")

> 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	other threads:[~2022-12-27 18:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2022-12-28 17:59   ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=868ritc4tu.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=60353@debbugs.gnu.org \
    --cc=rameshnedunchezian@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.