* Faces for Mode Line and Mode Line Inactive
@ 2004-12-05 0:06 Lennart Borgman
2004-12-05 21:11 ` Eli Zaretskii
2004-12-05 22:45 ` John Paul Wallington
0 siblings, 2 replies; 8+ messages in thread
From: Lennart Borgman @ 2004-12-05 0:06 UTC (permalink / raw)
I get a bit frustrated when I look at the face customization pages for Mode
Line and Mode Line Inactive. Mode Line Inactive inherits from Mode Line and
it sets no attributes on its own as far as I can see. Still it looks
different (lighter on my display).
There seems to be a piece missing, or is it supposed to be this way?
- Lennart
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Faces for Mode Line and Mode Line Inactive
2004-12-05 0:06 Faces for Mode Line and Mode Line Inactive Lennart Borgman
@ 2004-12-05 21:11 ` Eli Zaretskii
2004-12-05 22:43 ` Lennart Borgman
2004-12-06 1:40 ` Richard Stallman
2004-12-05 22:45 ` John Paul Wallington
1 sibling, 2 replies; 8+ messages in thread
From: Eli Zaretskii @ 2004-12-05 21:11 UTC (permalink / raw)
Cc: emacs-devel
> From: "Lennart Borgman" <lennart.borgman.073@student.lu.se>
> Date: Sun, 5 Dec 2004 01:06:38 +0100
>
> I get a bit frustrated when I look at the face customization pages for Mode
> Line and Mode Line Inactive. Mode Line Inactive inherits from Mode Line and
> it sets no attributes on its own as far as I can see. Still it looks
> different (lighter on my display).
??? Look at faces.el, around line 1780, where these two faces are
defined: mode-line-inactive inherits from mode-line only for terminals
that don't support colors and/or :style attributes. Otherwise,
mode-line defines different colors and a released-button style.
Am I missing something?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Faces for Mode Line and Mode Line Inactive
2004-12-05 21:11 ` Eli Zaretskii
@ 2004-12-05 22:43 ` Lennart Borgman
2004-12-05 23:14 ` Stefan Monnier
2004-12-06 1:40 ` Richard Stallman
1 sibling, 1 reply; 8+ messages in thread
From: Lennart Borgman @ 2004-12-05 22:43 UTC (permalink / raw)
Cc: emacs-devel
----- Original Message -----
From: "Eli Zaretskii" <eliz@gnu.org>
> > From: "Lennart Borgman" <lennart.borgman.073@student.lu.se>
> > Date: Sun, 5 Dec 2004 01:06:38 +0100
> >
> > I get a bit frustrated when I look at the face customization pages for
Mode
> > Line and Mode Line Inactive. Mode Line Inactive inherits from Mode Line
and
> > it sets no attributes on its own as far as I can see. Still it looks
> > different (lighter on my display).
>
> ??? Look at faces.el, around line 1780, where these two faces are
> defined: mode-line-inactive inherits from mode-line only for terminals
> that don't support colors and/or :style attributes. Otherwise,
> mode-line defines different colors and a released-button style.
>
> Am I missing something?
I don't know if you are missing or I am misunderstanding. I was looking at
the customization page for Mode Line Inactive face. There are no attributes
checked except for Inherit and it inherits from Mode Line on this page. So
to me it looks like the faces should be the same. (But as you wrote the
deffaces in faces.el are different.)
- Lennart
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Faces for Mode Line and Mode Line Inactive
2004-12-05 0:06 Faces for Mode Line and Mode Line Inactive Lennart Borgman
2004-12-05 21:11 ` Eli Zaretskii
@ 2004-12-05 22:45 ` John Paul Wallington
2004-12-05 23:17 ` Stefan Monnier
1 sibling, 1 reply; 8+ messages in thread
From: John Paul Wallington @ 2004-12-05 22:45 UTC (permalink / raw)
Cc: emacs-devel
> I get a bit frustrated when I look at the face customization pages for Mode
> Line and Mode Line Inactive. Mode Line Inactive inherits from Mode Line and
> it sets no attributes on its own as far as I can see. Still it looks
> different (lighter on my display).
>
> There seems to be a piece missing, or is it supposed to be this way?
I confirm that for me M-x customize-face mode-line-inactive says that
the face just inherits from mode-line despite it having a different
appearance.
I'm confused where the problem is, but don't have time to look at this
properly. However, I noticed that M-x customize-face
modeline-inactive (its alias) does show the differing specs.
Also, it appears that this patch (moving the default case to be the
last case) causes M-x customize-face mode-line-inactive to show the
differing specs too:
Index: faces.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v
retrieving revision 1.293
diff -u -r1.293 faces.el
--- faces.el 2 Dec 2004 10:56:05 -0000 1.293
+++ faces.el 5 Dec 2004 22:21:30 -0000
@@ -1786,16 +1786,16 @@
:group 'basic-faces)
(defface mode-line-inactive
- '((t
- :inherit mode-line)
- (((type x w32 mac) (background light) (class color))
+ '((((type x w32 mac) (background light) (class color))
:weight light
:box (:line-width -1 :color "grey75" :style nil)
:foreground "grey20" :background "grey90")
(((type x w32 mac) (background dark) (class color))
:weight light
:box (:line-width -1 :color "grey40" :style nil)
- :foreground "grey80" :background "grey30"))
+ :foreground "grey80" :background "grey30")
+ (t
+ :inherit mode-line))
"Basic mode line face for non-selected windows."
:version "21.4"
:group 'modeline
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Faces for Mode Line and Mode Line Inactive
2004-12-05 22:43 ` Lennart Borgman
@ 2004-12-05 23:14 ` Stefan Monnier
2004-12-06 18:47 ` Dan Nicolaescu
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2004-12-05 23:14 UTC (permalink / raw)
Cc: Eli Zaretskii, emacs-devel
>>>>> "Lennart" == Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
> ----- Original Message -----
> From: "Eli Zaretskii" <eliz@gnu.org>
>> > From: "Lennart Borgman" <lennart.borgman.073@student.lu.se>
>> > Date: Sun, 5 Dec 2004 01:06:38 +0100
>> >
>> > I get a bit frustrated when I look at the face customization pages for
> Mode
>> > Line and Mode Line Inactive. Mode Line Inactive inherits from Mode Line
> and
>> > it sets no attributes on its own as far as I can see. Still it looks
>> > different (lighter on my display).
>>
>> ??? Look at faces.el, around line 1780, where these two faces are
>> defined: mode-line-inactive inherits from mode-line only for terminals
>> that don't support colors and/or :style attributes. Otherwise,
>> mode-line defines different colors and a released-button style.
>>
>> Am I missing something?
> I don't know if you are missing or I am misunderstanding. I was looking at
> the customization page for Mode Line Inactive face. There are no attributes
> checked except for Inherit and it inherits from Mode Line on this page. So
> to me it looks like the faces should be the same. (But as you wrote the
> deffaces in faces.el are different.)
The code I see in faces.el is appended. It says that the face
unconditionally inherits from mode-line. This is how it should be, AFAIK.
Stefan
(defface mode-line-inactive
'((t
:inherit mode-line)
(((type x w32 mac) (background light) (class color))
:weight light
:box (:line-width -1 :color "grey75" :style nil)
:foreground "grey20" :background "grey90")
(((type x w32 mac) (background dark) (class color))
:weight light
:box (:line-width -1 :color "grey40" :style nil)
:foreground "grey80" :background "grey30"))
"Basic mode line face for non-selected windows."
:version "21.4"
:group 'modeline
:group 'basic-faces)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Faces for Mode Line and Mode Line Inactive
2004-12-05 22:45 ` John Paul Wallington
@ 2004-12-05 23:17 ` Stefan Monnier
0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2004-12-05 23:17 UTC (permalink / raw)
Cc: Lennart Borgman, emacs-devel
> Index: faces.el
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v
> retrieving revision 1.293
> diff -u -r1.293 faces.el
> --- faces.el 2 Dec 2004 10:56:05 -0000 1.293
> +++ faces.el 5 Dec 2004 22:21:30 -0000
> @@ -1786,16 +1786,16 @@
> :group 'basic-faces)
> (defface mode-line-inactive
> - '((t
> - :inherit mode-line)
> - (((type x w32 mac) (background light) (class color))
> + '((((type x w32 mac) (background light) (class color))
> :weight light
> :box (:line-width -1 :color "grey75" :style nil)
> :foreground "grey20" :background "grey90")
> (((type x w32 mac) (background dark) (class color))
> :weight light
> :box (:line-width -1 :color "grey40" :style nil)
> - :foreground "grey80" :background "grey30"))
> + :foreground "grey80" :background "grey30")
> + (t
> + :inherit mode-line))
> "Basic mode line face for non-selected windows."
> :version "21.4"
> :group 'modeline
Please read the NEWS file. You'll discover that the above patch changes
the behavior. The current code unconditionally inherits from mode-line
whereas your change make it inherit only for things like ttys or
b&w displays.
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Faces for Mode Line and Mode Line Inactive
2004-12-05 21:11 ` Eli Zaretskii
2004-12-05 22:43 ` Lennart Borgman
@ 2004-12-06 1:40 ` Richard Stallman
1 sibling, 0 replies; 8+ messages in thread
From: Richard Stallman @ 2004-12-06 1:40 UTC (permalink / raw)
Cc: lennart.borgman.073, emacs-devel
??? Look at faces.el, around line 1780, where these two faces are
defined: mode-line-inactive inherits from mode-line only for terminals
that don't support colors and/or :style attributes. Otherwise,
mode-line defines different colors and a released-button style.
I tried this under X, and found that it was as Lennart said:
mode-line-inactive inherits from mode-line and specifies no changes.
So I tried changing the defface of mode-line-inactive, putting
the t clause to the end. Then customize-face showed the proper
values.
Maybe customize-face is not handling the choice of clause the same way
that defface does. face-spec-choose seems to put the t attributes at
the end after the more specific attributes. The result is that the t
attributes don't entirely override everything if they come first.
I get the impression that face-spec-choose is trying to avoid dependence
on the order of the alternatives, but not entirely succeeding.
For customize-face, it looks like the function that handles this is
custom-filter-face-spec. I don't understand it, but I suspect it
disagrees with what face-spec-choose does.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Faces for Mode Line and Mode Line Inactive
2004-12-05 23:14 ` Stefan Monnier
@ 2004-12-06 18:47 ` Dan Nicolaescu
0 siblings, 0 replies; 8+ messages in thread
From: Dan Nicolaescu @ 2004-12-06 18:47 UTC (permalink / raw)
Cc: Eli Zaretskii, emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> The code I see in faces.el is appended. It says that the face
> unconditionally inherits from mode-line. This is how it should be, AFAIK.
[snip]
Not completely related to this discussion, but related to faces.el:
Shouldn't the mode-line and mode-line-inactive deffaces use
min-colors? (I somehow missed them when converting the other standard
deffaces to use min-colors).
May I check in this patch?
*** faces.el 06 Dec 2004 07:51:19 -0800 1.293
--- faces.el 06 Dec 2004 10:37:26 -0800
***************
*** 1775,1781 ****
(defface mode-line
! '((((type x w32 mac) (class color))
:box (:line-width -1 :style released-button)
:background "grey75" :foreground "black")
(t
--- 1775,1781 ----
(defface mode-line
! '((((class color) (min-colors 88))
:box (:line-width -1 :style released-button)
:background "grey75" :foreground "black")
(t
***************
*** 1788,1798 ****
(defface mode-line-inactive
'((t
:inherit mode-line)
! (((type x w32 mac) (background light) (class color))
:weight light
:box (:line-width -1 :color "grey75" :style nil)
:foreground "grey20" :background "grey90")
! (((type x w32 mac) (background dark) (class color))
:weight light
:box (:line-width -1 :color "grey40" :style nil)
:foreground "grey80" :background "grey30"))
--- 1788,1798 ----
(defface mode-line-inactive
'((t
:inherit mode-line)
! (((background light) (class color) (min-colors 88))
:weight light
:box (:line-width -1 :color "grey75" :style nil)
:foreground "grey20" :background "grey90")
! (((background dark) (class color) (min-colors 88))
:weight light
:box (:line-width -1 :color "grey40" :style nil)
:foreground "grey80" :background "grey30"))
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-12-06 18:47 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-05 0:06 Faces for Mode Line and Mode Line Inactive Lennart Borgman
2004-12-05 21:11 ` Eli Zaretskii
2004-12-05 22:43 ` Lennart Borgman
2004-12-05 23:14 ` Stefan Monnier
2004-12-06 18:47 ` Dan Nicolaescu
2004-12-06 1:40 ` Richard Stallman
2004-12-05 22:45 ` John Paul Wallington
2004-12-05 23:17 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).