* How to set minibuffer-prompt face foreground conditionally?
@ 2012-02-12 17:32 Richard Cobbe
2012-02-12 21:08 ` Peter Dyballa
0 siblings, 1 reply; 3+ messages in thread
From: Richard Cobbe @ 2012-02-12 17:32 UTC (permalink / raw)
To: help-gnu-emacs
I'm using GNU Emacs 23.3.1 on MacOS 10.6, although I've observed the same
behavior with 23.1.1 on Ubuntu 10.10.
I'm having trouble setting the foreground color of minibuffer-prompt in my
.emacs file. If I evaluate (set-face-foreground 'minibuffer-prompt "cyan")
either with M-x eval-expression or in the scratch buffer, then the face
changes color. But if I put the same thing into .emacs and restart, it has
no effect at all. Customizing the font works, but this isn't sufficient
for what I'm trying to do; see below.
Context: I want to change the foreground color of the minibuffer-prompt
face, but only when window-system is nil. Normally (when window-system is
one of 'mac 'ns or 'x) the minibuffer prompt is readable, but when I run
emacs in a terminal, the minibuffer prompt shows up as dark blue on the
only-slightly-different dark blue that I use for my xterm background. I do
have '(background-mode . dark) in default-frame-alist for all
window-systems.
Is there a way to do this that I'm overlooking?
Thanks,
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to set minibuffer-prompt face foreground conditionally?
2012-02-12 17:32 How to set minibuffer-prompt face foreground conditionally? Richard Cobbe
@ 2012-02-12 21:08 ` Peter Dyballa
2012-02-13 12:57 ` Richard Cobbe
0 siblings, 1 reply; 3+ messages in thread
From: Peter Dyballa @ 2012-02-12 21:08 UTC (permalink / raw)
To: Richard Cobbe; +Cc: help-gnu-emacs
Am 12.2.2012 um 18:32 schrieb Richard Cobbe:
> Is there a way to do this that I'm overlooking?
Possibly... I have set a customisation like that, which is active in all GNU Emacs variants, with or without windowing system:
'(minibuffer-prompt ((t (:background "yellow" :foreground "OrangeRed4" :weight bold))))
Could be I used its own customisation system for this.
--
Greetings
Pete
Windows, c'est un peu comme le beaujolais nouveau: à chaque nouvelle cuvée on sait que ce sera dégueulasse, mais on en prend quand même, par masochisme.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to set minibuffer-prompt face foreground conditionally?
2012-02-12 21:08 ` Peter Dyballa
@ 2012-02-13 12:57 ` Richard Cobbe
0 siblings, 0 replies; 3+ messages in thread
From: Richard Cobbe @ 2012-02-13 12:57 UTC (permalink / raw)
To: help-gnu-emacs
On Sun, Feb 12, 2012 at 10:08:40PM +0100, Peter Dyballa wrote:
>
> Am 12.2.2012 um 18:32 schrieb Richard Cobbe:
>
> > Is there a way to do this that I'm overlooking?
>
> Possibly... I have set a customisation like that, which is active in all GNU Emacs variants, with or without windowing system:
>
> '(minibuffer-prompt ((t (:background "yellow" :foreground "OrangeRed4" :weight bold))))
>
> Could be I used its own customisation system for this.
Thanks -- I wasn't aware that custom-set-faces could contain conditions
like this. With a little digging around in the help, I was able to find a
solution.
I'm not thrilled with it -- not only do I have to edit the customization
stuff by hand (which rather seems to defeat the purpose of the
customization system), but I still think that there should be a way to do
this programatically in elisp. However, I have a solution that works, and
I'm ok with that.
Thanks,
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-13 12:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-12 17:32 How to set minibuffer-prompt face foreground conditionally? Richard Cobbe
2012-02-12 21:08 ` Peter Dyballa
2012-02-13 12:57 ` Richard Cobbe
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).