From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53668 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.gnus.general Subject: Re: defface/defcustom question Date: Sat, 09 Aug 2003 18:43:22 +0200 Organization: http://purl.org/harder/ Sender: ding-owner@lists.math.uh.edu Message-ID: References: <84fzkb88a4.fsf@slowfox.is.informatik.uni-duisburg.de> <84llu3ht35.fsf@slowfox.is.informatik.uni-duisburg.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1060447516 27609 80.91.224.253 (9 Aug 2003 16:45:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 9 Aug 2003 16:45:16 +0000 (UTC) Original-X-From: ding-owner+M2212=ding+2Daccount=gmane.org@lists.math.uh.edu Sat Aug 09 18:45:14 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19lWqA-0004bc-00 for ; Sat, 09 Aug 2003 18:45:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19lWq9-0002o4-02 for ding-account@gmane.org; Sat, 09 Aug 2003 11:45:13 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19lWpz-0002nu-00 for ding@lists.math.uh.edu; Sat, 09 Aug 2003 11:45:03 -0500 Original-Received: (qmail 36830 invoked by alias); 9 Aug 2003 16:45:03 -0000 Original-Received: (qmail 36825 invoked from network); 9 Aug 2003 16:45:03 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by sclp3.sclp.com with SMTP; 9 Aug 2003 16:45:03 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 19lWwJ-0003fA-00 for ; Sat, 09 Aug 2003 18:51:35 +0200 Original-To: ding@gnus.org Original-Path: localhost.localdomain!nobody Original-Newsgroups: gnus.ding Original-Lines: 89 Original-NNTP-Posting-Host: 0xc3f952d5.esnxr1.ras.tele.dk Original-X-Trace: quimby.gnus.org 1060447895 14083 195.249.82.213 (9 Aug 2003 16:51:35 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 9 Aug 2003 16:51:35 GMT X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r; writes: > kai.grossjohann@gmx.net (Kai Großjohann) writes: > >> Simon Josefsson writes: >> >>> It also makes it possible to express "use the same face for this, that >>> and this" and then later be able to change the face only once to >>> change it in all places. >> >> But that's possible with regular faces already? Just use the same >> symbol (face name) in all those places? > > You mean changing gnus source? I meant for users. I think it's harder to understand for users. It's confusing to have two customization options with the same name (and very similar purpose). >>> And it simplifies font-lock stuff, compare >>> gnus-server-font-lock-keywords. >> >> I looked at it. It looks simple. But I can't see how variables made >> it simpler. > > font-lock-keywords uses face names, not faces. Compare > info://Elisp/Faces%20for%20Font%20Lock I don't see your point. This just means that you need to quote the name of the face -- I thinks that's a lot simpler than an extra layer of indirection. E.g. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=gnus-srvr.el.diff --- gnus/lisp/gnus-srvr.el Tue Jun 24 07:22:43 2003 +++ cvsgnus/lisp/gnus-srvr.el Sat Aug 9 15:50:22 2003 @@ -202,38 +202,13 @@ "Face used for displaying OFFLINE servers" :group 'gnus-server-visual) -(defcustom gnus-server-agent-face 'gnus-server-agent-face - "Face name to use on AGENTIZED servers." - :group 'gnus-server-visual - :type 'face) - -(defcustom gnus-server-opened-face 'gnus-server-opened-face - "Face name to use on OPENED servers." - :group 'gnus-server-visual - :type 'face) - -(defcustom gnus-server-closed-face 'gnus-server-closed-face - "Face name to use on CLOSED servers." - :group 'gnus-server-visual - :type 'face) - -(defcustom gnus-server-denied-face 'gnus-server-denied-face - "Face name to use on DENIED servers." - :group 'gnus-server-visual - :type 'face) - -(defcustom gnus-server-offline-face 'gnus-server-offline-face - "Face name to use on OFFLINE servers." - :group 'gnus-server-visual - :type 'face) - (defvar gnus-server-font-lock-keywords (list - '("(\\(agent\\))" 1 gnus-server-agent-face) - '("(\\(opened\\))" 1 gnus-server-opened-face) - '("(\\(closed\\))" 1 gnus-server-closed-face) - '("(\\(offline\\))" 1 gnus-server-offline-face) - '("(\\(denied\\))" 1 gnus-server-denied-face))) + '("(\\(agent\\))" 1 'gnus-server-agent-face) + '("(\\(opened\\))" 1 'gnus-server-opened-face) + '("(\\(closed\\))" 1 'gnus-server-closed-face) + '("(\\(offline\\))" 1 'gnus-server-offline-face) + '("(\\(denied\\))" 1 'gnus-server-denied-face))) (defun gnus-server-mode () "Major mode for listing and editing servers. --=-=-=--