[Top][All Lists]

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

Re: Start keybinding combination

From: Eli Zaretskii
Subject: Re: Start keybinding combination
Date: Mon, 31 Jan 2022 14:23:34 +0200

> Date: Sun, 30 Jan 2022 21:54:47 +0100
> From: Ergus <>
> Cc:
> >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?

A very limited variant of redisplay, which only updates the echo-area.

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

It would make the prompt much slower, because updating the mode line
requires a very thorough redisplay, the way it is implemented.  And if
you on top of that change the mode-line face, Emacs will need to
recompute all the faces (twice) as well.  I wonder if it's worth it.

reply via email to

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