From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: overriding a face [was: 23.0.50; face-problems with multy-tty] Date: Sun, 30 Sep 2007 16:53:43 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1191196464 30416 80.91.229.12 (30 Sep 2007 23:54:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 30 Sep 2007 23:54:24 +0000 (UTC) Cc: emacs-devel@gnu.org, bojohan+news@dd.chalmers.se To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 01 01:54:20 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ic8c7-0004up-2U for ged-emacs-devel@m.gmane.org; Mon, 01 Oct 2007 01:54:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ic8c3-0003YG-02 for ged-emacs-devel@m.gmane.org; Sun, 30 Sep 2007 19:54:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ic8bX-0003Me-Pu for emacs-devel@gnu.org; Sun, 30 Sep 2007 19:53:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ic8bV-0003Lm-AD for emacs-devel@gnu.org; Sun, 30 Sep 2007 19:53:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ic8bV-0003Li-8P for emacs-devel@gnu.org; Sun, 30 Sep 2007 19:53:41 -0400 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ic8bQ-0005HU-Pp; Sun, 30 Sep 2007 19:53:37 -0400 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l8UNrYCT011580; Sun, 30 Sep 2007 18:53:34 -0500 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id l8UNhRL4022312; Sun, 30 Sep 2007 17:53:33 -0600 Original-Received: from dhcp-amer-csvpn-gw1-141-144-64-133.vpn.oracle.com by acsmt351.oracle.com with ESMTP id 3255987501191196399; Sun, 30 Sep 2007 16:53:19 -0700 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 In-Reply-To: X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-Detected-Kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:80071 Archived-At: > From: Richard Stallman Sent: Friday, September 14, 2007 12:05 AM > Subject: Re: 23.0.50; face-problems with multy-tty > > > "something analogous to what `setq' does for `defvar' and > > `defcustom'. Something, for instance, that a user can put in > > .emacs to override a predefined `defface'. > > I am in favor of it. Maybe something like this would be a start? (defmacro set-face (face spec &optional doc &rest args) "Set the spec for face symbol FACE to SPEC. If FACE is a face, then FACE and SPEC are passed to `face-spec-set'. Otherwise, all arguments are passed to `defface'." `(if (facep ',face) (face-spec-set ',face ,spec) (defface ,face ,spec ,(or doc "REPLACE ME") ,@args))) Perhaps that's not entirely correct, but maybe it will stimulate someone who knows about this sort of thing to correct it. That seems to do what I was asking, in any case. The idea is that a user or Lisp code could use (set-face face spec) to define a new face or to override the definition of an existing face. But maybe this would be taken care of by Richard's proposed change to `face-spec-set'? (I don't fully understand that.)