From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Newsgroups: gmane.emacs.help Subject: Re: how to save a face in Lisp? Date: Wed, 03 Oct 2007 11:12:35 +0200 Organization: Chalmers University of Technology, Sweden Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1191404476 18109 80.91.229.12 (3 Oct 2007 09:41:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Oct 2007 09:41:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 03 11:41:12 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Id0iq-0000Ej-M6 for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Oct 2007 11:40:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Id0im-00037O-Ao for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Oct 2007 05:40:48 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newspeer2.se.telia.net!newspeer4.se.telia.net!se.telia.net!newsfeed.sunet.se!news01.sunet.se!129.16.222.141.MISMATCH!gide.ita.chalmers.se!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-NNTP-Posting-Host: remote4.student.chalmers.se Original-X-Trace: gide.ita.chalmers.se 1191402755 14556 129.16.29.77 (3 Oct 2007 09:12:35 GMT) Original-X-Complaints-To: usenet@gide.ita.chalmers.se Original-NNTP-Posting-Date: Wed, 3 Oct 2007 09:12:35 +0000 (UTC) Mail-Copies-To: never User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:6HUdVyZnCW1Vz+hqUcFF3iRdGM4= Original-Xref: shelby.stanford.edu gnu.emacs.help:152558 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:48068 Archived-At: "Drew Adams" writes: > For example, suppose this is the definition of face `foo': > > (defface foo > '((((background dark)) (:foreground "DarkGreen")) > (t (:foreground "Red"))) > "...") > > And suppose this has been evaluated, temporarily "customizing" the face > outside of Customize: > > (set-face-attribute 'foo nil :foreground "Yellow") > > And suppose that the background mode is not `dark'. Then the spec that needs > to be written if this face is saved is this: > > '((((background dark)) (:foreground "DarkGreen")) > (t (:foreground "Yellow"))) > (set-face-attribute FACE nil ...) overrides all other settings of FACE, so I don't think the `(background dark)' part should be saved. -- Johan Bockgård