Gnus development mailing list
 help / color / mirror / Atom feed
From: Jesper Harder <harder@myrealbox.com>
Subject: Re: defface/defcustom question
Date: Sat, 09 Aug 2003 18:43:22 +0200	[thread overview]
Message-ID: <m3bruykcid.fsf@defun.localdomain> (raw)
In-Reply-To: <iluoeyyesxi.fsf@latte.josefsson.org>

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

Simon Josefsson <jas@extundo.com> writes:

> kai.grossjohann@gmx.net (Kai Großjohann) writes:
>
>> Simon Josefsson <jas@extundo.com> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus-srvr.el.diff --]
[-- Type: text/x-patch, Size: 1598 bytes --]

--- 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.

  reply	other threads:[~2003-08-09 16:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-08 22:15 Jesper Harder
2003-08-09  1:54 ` Simon Josefsson
2003-08-09  9:55   ` Kai Großjohann
2003-08-09 11:32     ` Simon Josefsson
2003-08-09 13:13       ` Kai Großjohann
2003-08-09 15:45         ` Simon Josefsson
2003-08-09 16:43           ` Jesper Harder [this message]
2003-08-09 17:16           ` Alan Shutko
2003-08-09 18:05             ` Simon Josefsson
2003-08-09 18:44               ` Alan Shutko
2003-08-10 20:34                 ` Kai Großjohann
2003-08-25 14:41                 ` Per Abrahamsen
2003-08-10 20:33           ` Kai Großjohann
2003-08-12 11:53             ` Simon Josefsson
2003-08-14 21:23               ` Kai Großjohann
2003-08-15 12:07                 ` Alex Schroeder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3bruykcid.fsf@defun.localdomain \
    --to=harder@myrealbox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).