unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Start keybinding combination
Date: Mon, 31 Jan 2022 14:23:34 +0200	[thread overview]
Message-ID: <831r0o9jqx.fsf@gnu.org> (raw)
In-Reply-To: <20220130205447.hcdwnne5twp4f6sv@Ergus> (message from Ergus on Sun, 30 Jan 2022 21:54:47 +0100)

> Date: Sun, 30 Jan 2022 21:54:47 +0100
> From: Ergus <spacibba@aol.com>
> Cc: help-gnu-emacs@gnu.org
> 
> >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	other threads:[~2022-01-31 12:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220130191539.mkbq77zpn7ugizfi.ref@Ergus>
2022-01-30 19:15 ` Start keybinding combination Ergus
2022-01-30 19:44   ` Eli Zaretskii
2022-01-30 20:54     ` Ergus
2022-01-31 12:23       ` Eli Zaretskii [this message]
2022-01-31 15:42         ` Ergus

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=831r0o9jqx.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).