From xemacs-m  Tue Apr 15 10:29:21 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id KAA23567
	for <xemacs-beta@xemacs.org>; Tue, 15 Apr 1997 10:29:19 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id RAA23621; Tue, 15 Apr 1997 17:28:18 +0200 (MET DST)
Sender: hniksic@public.srce.hr
To: xemacs-beta@xemacs.org, emacs-custom@sunsite.auc.dk
Subject: Re: Specifiers in custom
References: <kigzpv3xjqu.fsf@jagor.srce.hr> <rj912mj446.fsf@zuse.dina.kvl.dk> <kigiv1qyjyr.fsf@jagor.srce.hr> <rjzpv2ho21.fsf@zuse.dina.kvl.dk> <kigohbgh9t8.fsf@jagor.srce.hr> <rj912kfu45.fsf@zuse.dina.kvl.dk> <kign2r0h6z5.fsf@jagor.srce.hr> <rj67xofpjo.fsf@zuse.dina.kvl.dk>
X-URL: ftp://gnjilux.cc.fer.hr/pub/unix/util/wget/
X-Attribution: Hrv
X-Face: &}4JQk=L;e.~x+|eo]#DGk@x3~ed!.~lZ}YQcYb7f[WL9L'Z*+OyA\nA
        EL1M(".[qvI#a2E6WYI5>>e7'@_)3Ol9p|Nn2wNa/;~06jL*B%tTcn/X
        vhAu7qeES0\|MF%$;sI#yn1+y"
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 15 Apr 1997 17:28:17 +0200
In-Reply-To: Per Abrahamsen's message of 15 Apr 1997 14:17:47 +0200
Message-ID: <kig912kgvam.fsf@jagor.srce.hr>
Lines: 50
X-Mailer: Gnus v5.4.42/XEmacs 19.15

Per Abrahamsen <abraham@dina.kvl.dk> writes:

> The :type argument describes the value, not how to set or get it.
> Doing what you outlined would be a violation of the layers.

OK.

> However, your basic point is right.  Sorry for just giving a knee-jerk
> reaction to the layer violation, instead of looking further.

We all have our bad days.  Ask Jari. :-)

> (defcustom ispell-dictionary nil
>   "bla bla"
>   :type '(choice (const :tag "default" nil)
>                  (string :format "%v"))
>   :group 'ispell
>   :set (lambda (symbol value)
>          (if (featurep 'ispell)
>              ;; Ispell is not loaded yet, just setting the variable will work!
>              (set-default symbol value)
>            ;; After loading the library, we must call this function.
>            (ispell-change-dictionary value))))
> 
> A similar `:get' function will also be available.

Wow.  This is an excellent generalization of what I imagined my
original `:specifier t' construct to imply.  I'd very much like to see
this in custom, as it could open a whole new range of possibilities.
Your `ispell-dictionary' example is a good one, as are the specifiers.

> - How should other namespaces be handled?  `ispell-dictionary' lives
>   in the variable namespace, but I can easily think of examples of
>   customizations that aren't directly associated with variables.
>   Specifiers may be one of these.  Forcing them into the variable
>   namespace seems wrong.

If one declares something with `defcustom', maybe he'll have to cope
with the fact that it becomes a variable?  I mean, you *will*
generally declare variables with this feature, although their setting
may be followed with some function calls.  As for specifiers, they are
in the variable namespace.

It looks acceptable to me to just stick to variables.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Then...  his face does a complete change of expression.  It goes from
a "Vengeance is mine" expression, to a "What the fuck" blank look.

