all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ergus <spacibba@aol.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Start keybinding combination
Date: Sun, 30 Jan 2022 21:54:47 +0100	[thread overview]
Message-ID: <20220130205447.hcdwnne5twp4f6sv@Ergus> (raw)
In-Reply-To: <837dah9fet.fsf@gnu.org>

On Sun, Jan 30, 2022 at 09:44:58PM +0200, Eli Zaretskii wrote:
>> Date: Sun, 30 Jan 2022 20:15:39 +0100
>> From: Ergus <spacibba@aol.com>
>>
>> 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
work.

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	other threads:[~2022-01-30 20:54 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 [this message]
2022-01-31 12:23       ` Eli Zaretskii
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

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

  git send-email \
    --in-reply-to=20220130205447.hcdwnne5twp4f6sv@Ergus \
    --to=spacibba@aol.com \
    --cc=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.
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.