From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: reducing defface redundancy Date: 22 Apr 2002 09:28:07 +0900 Sender: emacs-devel-admin@gnu.org Message-ID: <878z7gh90o.fsf@tc-1-100.kawasaki.gol.ne.jp> References: <877kn3qczq.fsf@tc-1-100.kawasaki.gol.ne.jp> <200204212002.g3LK2Y401740@aztec.santafe.edu> Reply-To: Miles Bader NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1019435432 1331 127.0.0.1 (22 Apr 2002 00:30:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 22 Apr 2002 00:30:32 +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 16zRiy-0000LM-00 for ; Mon, 22 Apr 2002 02:30:32 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16zRjQ-0004ku-00 for ; Mon, 22 Apr 2002 02:31:00 +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 16zRin-0000f4-00; Sun, 21 Apr 2002 20:30:21 -0400 Original-Received: from smtp02.fields.gol.com ([203.216.5.132]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 16zRhL-0000Yz-00; Sun, 21 Apr 2002 20:28:51 -0400 Original-Received: from tc-2-228.kawasaki.gol.ne.jp ([203.216.25.228] helo=tc-1-100.kawasaki.gol.ne.jp) by smtp02.fields.gol.com with esmtp (Magnetic Fields) id 16zRhJ-0001KQ-00; Mon, 22 Apr 2002 09:28:49 +0900 Original-Received: by tc-1-100.kawasaki.gol.ne.jp (Postfix, from userid 1000) id 85F6D307E; Mon, 22 Apr 2002 09:28:07 +0900 (JST) Original-To: rms@gnu.org System-Type: i686-pc-linux-gnu In-Reply-To: <200204212002.g3LK2Y401740@aztec.santafe.edu> Original-Lines: 45 X-Abuse-Complaints: abuse@gol.com 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:2968 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2968 Richard Stallman writes: > The basic idea is to allow using a lisp vector ([...]) as a kind of `or' > expression in the attribute part of a defface clause. > > Your proposal makes a number of other changes; > is this the best way to do all of them? > > I don't see how an "or" construct would be a kind of clause: > > CLAUSE ::= ATTRIBUTE > | (TESTS CLAUSE...) ; traditional top-level style > | [SPECS ...] ; `or' vector style > > Shouldn't it be a kind of TEST instead? Well, it's not really an `or' in the exact same sense as a typical or function used in lisp, say. It's more like the alternatives used for a prolog rule or something, it tries each element in order until it finds out that is `supportable'. So a user can just write: [ALTERNATIVE1 ALTERNATIVE2 ... DEFAULT] and the lisp code will effectively say `does the display support all the attributes ALTERNATIVE1? If so, lets use that. If not, does the display support all the attributes in ALTERNATIVE2? ...' etc. I think this often _exactly_ what people are actually _thinking_ when they design a defface spec (they want a certain effect for the face, and can think of several physical appearances that might convey it). [Note that the I've suggested adding the `capability testing' as a traditional TEST as well, in case someone wants to use that instead.] I do think, BTW, that the ability to write non-conditional defface specs with this grammar is a benefit, since I always get annoyed that I've got to stick in the ((t ...)) crap even when I know I don't need any tests... :-) -Miles -- Would you like fries with that?