unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: sdn.gnuem@mailnull.com
To: help-gnu-emacs@gnu.org
Subject: Re: Different text/properties in active vs inactive mode line
Date: Sat, 30 Apr 2011 20:46:51 -0400 (EDT)	[thread overview]
Message-ID: <20110501004651.38B025101F9@outside.256.com> (raw)

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	other threads:[~2011-05-01  0:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-01  0:46 sdn.gnuem [this message]
2011-05-01  7:49 ` Different text/properties in active vs inactive mode line Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2011-05-02 18:03 sdn.gnuem
2011-04-30 15:25 sdn.gnuem
2011-04-30 16:14 ` Eli Zaretskii
2011-04-30 13:17 sdn.gnuem
2011-04-29 21:01 sdn.gnuem
2011-04-30 13:46 ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20110501004651.38B025101F9@outside.256.com \
    --to=sdn.gnuem@mailnull.com \
    --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.
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).