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

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

Re: Different text/properties in active vs inactive mode line


From: sdn . gnuem
Subject: Re: Different text/properties in active vs inactive mode line
Date: Sat, 30 Apr 2011 20:46:51 -0400 (EDT)

On Sat, Apr 30, 2011 at 12:14 PM -0400 (EDT), Eli Zaretskii wrote:

> > From: sdn.gnuem@mailnull.com

> > Date: Sat, 30 Apr 2011 11:25:40 -0400 (EDT)

[...]

> > Is there a variable or function that will tell me the current face of

> > the mode line?

> 

> Actually, there's a simpler method: Emacs uses the `mode-line' face

> for the selected window, and `mode-line-inactive' for all the other

> windows.  So you can use the `selected-window' function and compare

> its value to the window for which you want to change the mode-line

> appearance.





    I appreciate your help so far, Eli, but I confess I am still not

seeing all the way to the end yet.



    I don't want to change the face of my mode-line status strings for

one or two specific windows; I want to use one face for particular

status labels when they are displayed in the mode line for the active

window, and a different face for those status labels when they are

displayed in the mode line for all inactive windows.



    As an experiment, just now, I added this element:

        (:eval (prin1-to-string (selected-window)))



to mode-line-format.  I am composing this message in a frame with two

windows.  The active window has the label "#<window 7 on *mail*>" in

the mode line; the other window has the label "#<window 17 on *Help*>".

The window numbers do not change, of course, when I switch between the

two windows.  So I do not understand what you are suggesting I compare

to selected-window in order to determine which face to use.



Thanks in advance,

-- Sue D. Nymme



----------
This message was sent from a MailNull anti-spam account.  You can get
your free account and take control over your email by visiting the
following URL.

   http://mailnull.com/



reply via email to

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