[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting the background color of the minibuffer
From: |
Óscar Fuentes |
Subject: |
Re: Setting the background color of the minibuffer |
Date: |
Wed, 10 Dec 2014 17:24:22 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> Is it possible to set the background color (the face, in general terms)
>> of the minibuffer (and only of the minibuffer) without using a dedicated
>> frame for it?
>
> Did you try face-remapping?
Yes. Something like this:
Starting from
http://stackoverflow.com/questions/12654592/change-the-background-color-of-the-minibuffer-when-input-is-needed
where the solution is:
(add-hook 'minibuffer-setup-hook
(lambda ()
(make-local-variable 'face-remapping-alist)
(add-to-list 'face-remapping-alist
'(default (:background "green")))))
That works as advertised: the background changes when you are working on
the minibuffer.
However, I want the background changed permanently. So I tried:
(dolist (b (buffer-list))
(when (minibufferp b)
(with-current-buffer b
(make-local-variable 'face-remapping-alist)))
(add-to-list 'face-remapping-alist
'(default (:background "black"))))
but that changes the background of all buffers. And the minibuffer, when
it is empty, eventually comes back to the original background.