help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: conditional font faces


From: Tim Visher
Subject: Re: conditional font faces
Date: Mon, 1 Mar 2010 20:25:09 -0500

On Mon, Mar 1, 2010 at 4:58 PM, Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:
> Hi,
>
> On 01/03/10 10:50 AM, Thamer Mahmoud wrote:
>>
>> Suvayu Ali<fatkasuvayu+linux@gmail.com>  writes:
>>
>> However, this won't work when using emacsclient -t. So if you run server
>> or daemon mode, use this instead:
>>
>> (defun my-color-customizations-for-nw (frame)
>>   "Runs after creating new frames"
>>   (select-frame frame)
>>   (when (not window-system)
>>     (set-face-foreground 'minibuffer-prompt "black" frame)))
>> (add-hook 'after-make-frame-functions 'my-color-customizations-for-nw)
>
> I have a small problem. If I start a no-window emacs in regular mode (as in
> no server) then this doesn't take effect for the first frame. However the
> change is as expected for any subsequent frame I create.
>
> Even putting something like,
>
> (my-color-customizations-for-nw (selected-frame))
>
> doesn't help. Trying the same thing with
>
> (when (window-system)
> ...)
>
> doesn't have the same problem with a x-window (GUI) emacs.
>
> Does anyone have any idea about this? Thanks in advance for any thoughts.

I believe you would need to put

    (my-color-customizations-for-nw (selected-frame))

or something along those lines in your .emacs file to get the first
frame created to display using those customizations.  Not sure about
the (selected-frame) portion though.  Best I could come up with on a
cursory look through the ELisp reference manual.

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail




reply via email to

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