[Top][All Lists]

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

Re: Start keybinding combination

From: Ergus
Subject: Re: Start keybinding combination
Date: Sun, 30 Jan 2022 21:54:47 +0100

On Sun, Jan 30, 2022 at 09:44:58PM +0200, Eli Zaretskii wrote:
Date: Sun, 30 Jan 2022 20:15:39 +0100
From: Ergus <>

If a user wants to start a command like `C-x r b` I would like to change
the mode-line color after the `C-x`. I suppose that this may be a call
to a hook in the same place that updates the echo area inserting the
current prefix.

What would such a hook do to produce the effect that you want?  The
mode-line color change will not be visible unless you force redisplay
of the mode line.

Hi Eli:

My question comes from the fact that I see the prefix in the echo area
and it looks inconspicuous. So, some redisplay is actually done
right?. I thought that a hook and let the user implement something could

Something like:

(add-hook the-new-hook (lambda ()
          (face-remap-add-relative 'mode-line :background some-color)))

And then call `face-remap-remove-relative` in the opposed|symmetric exit
hook... similar to what minibuffer-setup-hook/minibuffer-exit-hook do.

But I could be wrong.

Does it makes sense?

reply via email to

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