From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.help Subject: Re: face at point Date: 20 Nov 2002 16:34:55 +0900 Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: Reply-To: Miles Bader NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1037777773 26331 80.91.224.249 (20 Nov 2002 07:36:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 20 Nov 2002 07:36:13 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18EPP7-0006qA-00 for ; Wed, 20 Nov 2002 08:36:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18EPPO-0005Sp-00; Wed, 20 Nov 2002 02:36:26 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18EPOC-0003TE-00 for help-gnu-emacs@gnu.org; Wed, 20 Nov 2002 02:35:12 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18EPO7-0003Gt-00 for help-gnu-emacs@gnu.org; Wed, 20 Nov 2002 02:35:10 -0500 Original-Received: from tyo202.gate.nec.co.jp ([210.143.35.52]) by monty-python.gnu.org with esmtp (Exim 4.10) id 18EPO5-0003F2-00; Wed, 20 Nov 2002 02:35:06 -0500 Original-Received: from mailgate4.nec.co.jp ([10.7.69.195]) by TYO202.gate.nec.co.jp (8.11.6/3.7W01080315) with ESMTP id gAK7Ywl02710; Wed, 20 Nov 2002 16:34:59 +0900 (JST) Original-Received: from mailsv4.nec.co.jp (mailgate51.nec.co.jp [10.7.69.196]) by mailgate4.nec.co.jp (8.11.6/3.7W-MAILGATE-NEC) with ESMTP id gAK7YwR21742; Wed, 20 Nov 2002 16:34:58 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp ([10.30.114.133]) by mailsv4.nec.co.jp (8.11.6/3.7W-MAILSV4-NEC) with ESMTP id gAK7Yv201372; Wed, 20 Nov 2002 16:34:57 +0900 (JST) Original-Received: from mcspd15.ucom.lsi.nec.co.jp (mcspd15 [10.30.114.174]) by mcsss2.ucom.lsi.nec.co.jp (8.10.2+Sun/3.7Wlsi_mx_6.0) with ESMTP id gAK7YuB18938; Wed, 20 Nov 2002 16:34:56 +0900 (JST) Original-Received: by mcspd15.ucom.lsi.nec.co.jp (Postfix, from userid 31295) id 26EA43815; Wed, 20 Nov 2002 16:34:55 +0900 (JST) Original-To: help-gnu-emacs@gnu.org System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: Original-Lines: 55 Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:3775 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3775 Eli Zaretskii 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?