emacs-devel
[Top][All Lists]
Advanced

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

Confused about face's DISPLAY specs


From: Tassilo Horn
Subject: Confused about face's DISPLAY specs
Date: Thu, 23 Feb 2012 09:08:03 +0100
User-agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.93 (gnu/linux)

Hi all,

I'm a bit confused about the DISPLAY spec of faces.  What I want is that
all my custom-set-faces take effect only in graphic frames, but just go
with the default faces for tty frames.  So I've tried to use a (type
graphic) entry in the display spec (my-faces.el with just my
custom-set-faces attached), i.e.,

--8<---------------cut here---------------start------------->8---
(custom-set-faces
 '(diff-added ((((type graphic)) (:inherit diff-changed :background 
"#39E639"))))
 ;; [...]
)
--8<---------------cut here---------------end--------------->8---

The result is, that with

  $ emacs -Q -l my-faces.el

my faces are applied in the resulting X frame.  But when I start the
server and do

  $ emacsclient -t

in a black-bg/white-fg gnome terminal, I get an emacs tty frame with
grey (white) background an black foreground.  Furthermore, visiting some
source code file, every text is just black, except for text fontified
with font-lock-type-face which is green.

  - Why does the tty frame change the foreground/background colors?  I
    don't have customizations of the default face, nor do I have
    settings in ~/.Xdefaults or ~/.Xresourses.  But I compiled emacs
    with gsettings support, so maybe GNOME forces white background and
    black foreground?

  - And why is every text black with that one exception?

When I do it the other way round, e.g.,

  $ emacs -Q -nw -l my-faces.el
  # M-x server-start
  $ emacsclient -c

the tty frame stays in the terminal color theme, e.g., white foreground
on black background.  But again, every text with the exception of text
fontified with font-lock-type-face is just white.  The graphic frame
seems to have all my face settings, so that's fine.

Oh, an interestingly, if I fire up another tty frame,

  $ emacsclient -t

that has a white background again!  So it seems, after firing up the
first X frame, any next frame is forced to have its foreground /
background color.

Bye,
Tassilo

Attachment: my-faces.el
Description: application/emacs-lisp


reply via email to

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