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

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

Re: Conditional Mode Line Background


From: Andreas Politz
Subject: Re: Conditional Mode Line Background
Date: Sun, 21 Dec 2008 23:39:54 +0100
User-agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018)

Florian Beck wrote:
If you wanted to display the mode line of any window where
`window-dedicated-p' is set in, say, »light blue«, how would you do that?


(setq mode-line-format
      '(:eval (let ((ml (concat
                         (format-mode-line
                          (default-value 'mode-line-format))
                         "%-")))      ;dashes seem to get lost
                (if (window-dedicated-p (selected-window))
                    (propertize ml 'face '(:background "blue"))
                  ml))))


I don't know how to detect (in)activeness, but would be interested to find
out.

-ap


reply via email to

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