all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@lsi.nec.co.jp>
Subject: Re: face at point
Date: 20 Nov 2002 16:34:55 +0900	[thread overview]
Message-ID: <buowun8lmn4.fsf@mcspd15.ucom.lsi.nec.co.jp> (raw)
In-Reply-To: <mailman.1037771296.12946.help-gnu-emacs@gnu.org>

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?

       reply	other threads:[~2002-11-20  7:34 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1037771296.12946.help-gnu-emacs@gnu.org>
2002-11-20  7:34 ` Miles Bader [this message]
2002-11-20  7:39 ` face at point Kai Großjohann
     [not found] ` <mailman.1037777785.20916.help-gnu-emacs@gnu.org>
2002-11-20 11:10   ` Oliver Scholz
     [not found] <mailman.1037687132.614.help-gnu-emacs@gnu.org>
2002-11-19 22:16 ` Tim Cross
2002-11-20  5:47   ` Eli Zaretskii
2002-11-20 11:06   ` Oliver Scholz
2002-11-20 14:01     ` Stefan Monnier <foo@acm.com>
2002-11-20 16:00       ` Michael Slass
     [not found] <mailman.1037688495.14173.help-gnu-emacs@gnu.org>
2002-11-19  8:54 ` Fredrik Staxeng
2002-11-19 18:14   ` Eli Zaretskii
     [not found]   ` <mailman.1037733383.18353.help-gnu-emacs@gnu.org>
2002-11-20 13:37     ` Fredrik Staxeng
2002-11-20 16:13       ` Eli Zaretskii
     [not found]       ` <mailman.1037812462.4160.help-gnu-emacs@gnu.org>
2002-11-20 17:56         ` Fredrik Staxeng
2002-11-15  2:13 John Hunter
2002-11-15  2:50 ` Jesper Harder
2002-11-15  3:30   ` John Hunter
2002-11-15  3:40     ` Jesper Harder
2002-11-15 10:24       ` Oliver Scholz
2002-11-15 13:37         ` Jesper Harder
2002-11-15 14:51           ` Jesper Harder
2002-11-15 16:58             ` Oliver Scholz
2002-11-16 18:49     ` Kai Großjohann
2002-11-15  4:24 ` Miles Bader
     [not found] ` <mailman.1037335988.3983.help-gnu-emacs@gnu.org>
2002-11-15 14:21   ` Michael J Downes
2002-11-15 14:31   ` John Hunter
2002-11-17 22:40 ` Tim Cross
2002-11-17 23:00   ` Miles Bader
2002-11-18  5:54     ` Tim Cross
2002-11-18  8:52       ` Miles Bader
     [not found]       ` <mailman.1037610573.27378.help-gnu-emacs@gnu.org>
2002-11-18 13:48         ` Fredrik Staxeng
2002-11-18 17:23           ` Oliver Scholz
2002-11-18 18:16             ` Fredrik Staxeng
2002-11-18 17:56           ` Eli Zaretskii
     [not found]           ` <mailman.1037646827.31512.help-gnu-emacs@gnu.org>
2002-11-19  6:02             ` Fredrik Staxeng
2002-11-19  6:47               ` Eli Zaretskii
2002-11-19  9:20               ` Miles Bader
2002-11-19 20:24               ` Kai Großjohann
2002-11-18 22:06         ` Tim Cross
2002-11-18 22:36           ` Jesper Harder
2002-11-19  2:00             ` Miles Bader
2002-11-19  1:55           ` Miles Bader
2002-11-19  5:31             ` Eli Zaretskii
     [not found]           ` <mailman.1037671096.385.help-gnu-emacs@gnu.org>
2002-11-19  5:58             ` Tim Cross
2002-11-19  6:24               ` Eli Zaretskii
2002-11-19  6:24             ` Fredrik Staxeng
2002-11-19  6:56               ` Eli Zaretskii
2002-11-19  8:56               ` Miles Bader
     [not found]               ` <mailman.1037696237.22239.help-gnu-emacs@gnu.org>
2002-11-19  9:46                 ` Fredrik Staxeng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=buowun8lmn4.fsf@mcspd15.ucom.lsi.nec.co.jp \
    --to=miles@lsi.nec.co.jp \
    --cc=miles@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.