From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.devel Subject: Re: terminal capability querying Date: Sat, 20 Apr 2002 10:08:38 +0300 Sender: emacs-devel-admin@gnu.org Message-ID: <1349-Sat20Apr2002100838+0300-eliz@is.elta.co.il> References: <87bscfqffo.fsf@tc-1-100.kawasaki.gol.ne.jp> Reply-To: Eli Zaretskii NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1019287295 24616 127.0.0.1 (20 Apr 2002 07:21:35 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 20 Apr 2002 07:21:35 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16ypBf-0006Ov-00 for ; Sat, 20 Apr 2002 09:21:35 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16ypVO-0007DM-00 for ; Sat, 20 Apr 2002 09:41:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16ypBF-0008Hp-00; Sat, 20 Apr 2002 03:21:09 -0400 Original-Received: from thor.inter.net.il ([192.114.186.11]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16yp8c-00087t-00; Sat, 20 Apr 2002 03:18:27 -0400 Original-Received: from zaretsky ([80.230.2.40]) by thor.inter.net.il (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id ABY44009; Sat, 20 Apr 2002 10:18:02 +0300 (IDT) Original-To: miles@gnu.org X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9 In-Reply-To: <87bscfqffo.fsf@tc-1-100.kawasaki.gol.ne.jp> (message from Miles Bader on 20 Apr 2002 11:20:11 +0900) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2819 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2819 > From: Miles Bader > Date: 20 Apr 2002 11:20:11 +0900 > > So, I propose adding the ability to ask emacs _which_ of these > capabilities a display supports, both in lisp code and in `defface' > specifications. I think it's a good idea. > (display-capable-p ATTRIBUTE &optional DISPLAY) > > Return non-nil if DISPLAY supports the face attribute ATTRIBUTE. Could we change the name to something like display-attributes-p, or even display-text-attributes-p? display-capable-p sounds too general for the specific purpose you have in mind (if I understand you well). Otherwise, I like the design. > ATTRIBUTE should be either the name of a face attribute, e.g., > `:weight', `:underline', etc., or a cons-cell or list containing a > face attribute and a specific value for it, e.g., (:weight bold). If we intend to use this mainly for a tty (I guess windowed displays will always pass all these tests), it's perhaps better to use `:bold' directly, since terminals generally don't support more than a single value of `weight'. The same goes for `:slant': I think it's better to use `:italic'. What about `dim' and `blink', btw? > It's not at all hard to implement this, I think, so I will do so if no > one objects. I'm for it. There's one other piece of work that IMHO needs to be done to make defface better: the ability to test for the number of supported colors. This is needed for supporting terminals that can display large number of colors in text mode, such as recent versions of xterm. We could then all but get rid of testing the frame type (`x', `w32', `tty', etc.) in defface, and instead look at the number of supported colors. This has been on my todo for a long time, and I will do it as soon as I can, but if someone feels to make it happen earlier...