From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78902 Path: news.gmane.org!not-for-mail From: pmlists@free.fr (Peter =?utf-8?Q?M=C3=BCnster?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: setting face in gnus-user-format-function-x Date: Fri, 27 May 2011 10:26:39 +0200 Organization: Micropit Message-ID: <87r57kim68.fsf@micropit.couberia.bzh> References: <87sjs5thro.fsf@micropit.couberia.bzh> <877h9gpqnp.fsf@marauder.physik.uni-ulm.de> <87zkmaq4sj.fsf@micropit.couberia.bzh> <87r57mnf1c.fsf@marauder.physik.uni-ulm.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1306484887 26838 80.91.229.12 (27 May 2011 08:28:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 May 2011 08:28:07 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M27202@lists.math.uh.edu Fri May 27 10:28:04 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QPsOm-00026a-Bw for ding-account@gmane.org; Fri, 27 May 2011 10:28:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1QPsNn-0003LM-2M; Fri, 27 May 2011 03:26:59 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1QPsNl-0003L7-AC for ding@lists.math.uh.edu; Fri, 27 May 2011 03:26:57 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1QPsNh-0005gl-KB for ding@lists.math.uh.edu; Fri, 27 May 2011 03:26:54 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1QPsNe-0006xj-M6 for ding@gnus.org; Fri, 27 May 2011 10:26:50 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QPsNe-0001TV-Gr for ding@gnus.org; Fri, 27 May 2011 10:26:50 +0200 Original-Received: from arennes-651-1-310-75.w2-12.abo.wanadoo.fr ([2.12.133.75]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 May 2011 10:26:50 +0200 Original-Received: from pmlists by arennes-651-1-310-75.w2-12.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 May 2011 10:26:50 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 17 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: arennes-651-1-310-75.w2-12.abo.wanadoo.fr User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:cAtM4BI1p++L5G9tYBj8BI39sK8= X-Spam-Score: -4.9 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:78902 Archived-At: On Thu, May 26 2011, Reiner Steib wrote: >> (defun gnus-user-format-function-x (header) >> (format "%%%d{%c%%}" (if (equal gnus-tmp-unread gnus-ancient-mark) 2 3) >> gnus-tmp-unread)) > > You should use e.g. `%3{' and `%3}' _directly_ in > `gnus-summary-line-format' after defining face `gnus-face-2' with > `defface'. No need for a user-format-function. > > [ Re-reading you goal... Hm, maybe this is not sufficient for you. ] Indeed. I need something like "if" or "cond". Different faces for different marks. -- Peter