[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(type graphic)
From: |
Eli Zaretskii |
Subject: |
(type graphic) |
Date: |
Wed, 25 Oct 2000 13:49:11 +0200 (IST) |
This change:
2000-10-24 Miles Bader <address@hidden>
* faces.el (face-spec-set-match-display): Add `graphic' display
type (the inverse of `tty'). Use `display-graphic-p' instead of
the window-system variable.
introduced this code:
match (cond ((eq req 'type)
(or (memq window-system options)
(if (display-graphic-p frame)
(memq 'graphic options)
(memq 'tty options))
I'm not sure this is a good idea. display-graphic-p says whether the
display can display several frames and several fonts at the same time. It
looks like the capabilities that defface wants to know about not
necessarily overlap what display-graphic-p reports. So using
display-graphic-p might misfire.
Miles, could you please tell what does defface need to know about the
display capabilities for the above distinction? Is it a number of
supported colors, perhaps? If so, we can make a better test, I think.
The main motivation for the introduction of the display-*-p predicates was
to provide a means to avoid the maintenance burden of retrofitting
working code, because capabilities of certain display types change as
support for new features is added by the platform-specific maintainers.
(That's why window-system is a Bad Idea: it doesn't say anything about
what a given display can or cannot do.) Therefore, we should try to
analyze, in every given case, what capabilities are involved, and make
them explicit in the code, rather than rely on general features that are
assumed to work on certain displays.
- (type graphic),
Eli Zaretskii <=