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: RE: overriding a face [was: 23.0.50; face-problems with multy-tty] Date: Mon, 1 Oct 2007 11:20:16 -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 1191262933 5388 80.91.229.12 (1 Oct 2007 18:22:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 Oct 2007 18:22:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 01 20:22:09 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 1IcPuB-0002fd-Uo for ged-emacs-devel@m.gmane.org; Mon, 01 Oct 2007 20:22:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IcPu7-00051S-Tj for ged-emacs-devel@m.gmane.org; Mon, 01 Oct 2007 14:22:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IcPtC-0004X5-MG for emacs-devel@gnu.org; Mon, 01 Oct 2007 14:21:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IcPtA-0004V4-Uw for emacs-devel@gnu.org; Mon, 01 Oct 2007 14:21:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IcPtA-0004Us-LS for emacs-devel@gnu.org; Mon, 01 Oct 2007 14:21:04 -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 1IcPt6-0001Gy-BD; Mon, 01 Oct 2007 14:21:00 -0400 Original-Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l91IKunR001404; Mon, 1 Oct 2007 13:20:57 -0500 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id l913Vs4U009745; Mon, 1 Oct 2007 12:20:56 -0600 Original-Received: from dhcp-4op11-4op12-west-130-35-178-158.us.oracle.com by acsmt350.oracle.com with ESMTP id 3258831951191262813; Mon, 01 Oct 2007 11:20:13 -0700 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Importance: Normal 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:80107 Archived-At: > Maybe something like this would be a start? > > (defmacro set-face (face spec &optional doc &rest args) > `(if (facep ',face) > (face-spec-set ',face ,spec) > (defface ,face ,spec ,(or doc "REPLACE ME") ,@args))) > > This seems like an incoherent combination of two different constructs, > like a conditional choice between set and setq. I don't think it is > a good idea. I don't understand. To me, it is only like `setq'. If the face exists, it replaces its current definition (assuming `face-spec-set' does that); otherwise, it creates it. How is this in any way like `set'? This seems to work as I hoped. In any case, I'm looking for this functionality (which you said you were in favor of), regardless of how it is implemented. > We might want to make `set-face' an alias for `face-spec-set'. What would be gained by that? What I'm asking for is something that will _create or replace_ a face definition, the same way `setq' creates a new variable or replaces an existing variable's value.