[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: face at point
From: |
Miles Bader |
Subject: |
Re: face at point |
Date: |
20 Nov 2002 16:34:55 +0900 |
Eli Zaretskii <eliz@is.elta.co.il> writes:
> > All I really wanted to know was "Which is the best/most
> > appropriate/accepted way of distinguishing between emacs running on a
> > tty, in its own X frame and within an X term so that I can set my
> > colours accordingly.
>
> As I wrote earlier display-graphic-p and display-color-cells will let you
> do that.
BTW, in the CVS version of emacs, I've written a new querying function
that's supposed to let you do more `result oriented queries' (though
whether it's actually enough, I'm not sure), somewhat clumsily called
`display-supports-face-attributes-p'. Here's the help for it:
display-supports-face-attributes-p is a compiled Lisp function in `faces'.
(display-supports-face-attributes-p ATTRIBUTES &optional DISPLAY)
Return non-nil if all the face attributes in ATTRIBUTES are supported.
The optional argument DISPLAY can be a display name, a frame, or
nil (meaning the selected frame's display)
The definition of `supported' is somewhat heuristic, but basically means
that a face containing all the attributes in ATTRIBUTES, when merged
with the default face for display, can be represented in a way that's
(1) different in appearance than the default face, and
(2) `close in spirit' to what the attributes specify, if not exact.
Point (2) implies that a `:weight black' attribute will be satisified by
any display that can display bold, and a `:foreground "yellow"' as long
as it can display a yellowish color, but `:slant italic' will _not_ be
satisified by the tty display code's automatic substitution of a `dim'
face for italic.display-supports-face-attributes-p is a compiled Lisp
function in `faces'.
(display-supports-face-attributes-p ATTRIBUTES &optional DISPLAY)
Return non-nil if all the face attributes in ATTRIBUTES are supported.
The optional argument DISPLAY can be a display name, a frame, or
nil (meaning the selected frame's display)
The definition of `supported' is somewhat heuristic, but basically means
that a face containing all the attributes in ATTRIBUTES, when merged
with the default face for display, can be represented in a way that's
(1) different in appearance than the default face, and
(2) `close in spirit' to what the attributes specify, if not exact.
Point (2) implies that a `:weight black' attribute will be satisified by
any display that can display bold, and a `:foreground "yellow"' as long
as it can display a yellowish color, but `:slant italic' will _not_ be
satisified by the tty display code's automatic substitution of a `dim'
face for italic.
-Miles
--
Would you like fries with that?
- Re: face at point, (continued)
Re: face at point, Tim Cross, 2002/11/19
Re: face at point,
Miles Bader <=
Re: face at point, Kai Großjohann, 2002/11/20
Re: face at point, Oliver Scholz, 2002/11/20