all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* customization type `vector'
@ 2006-12-12 21:14 Drew Adams
  2007-07-01 15:33 ` Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2006-12-12 21:14 UTC (permalink / raw)


IIUC, customization type `vector', like type `list', can only be used for a
fixed number of elements. For lists, you can use `repeat' for a list with an
arbitrary number of elements, but I see no way to do this for vectors.

Is there some way, for instance, to specify that a value must be a vector of
characters? If not, is the only alternative to use `sexp' or
`restricted-sexp'?

If so, can this be remedied after the release? If not, what's the best that
could be done with, say, `restricted-sexp'? Would it be (restricted-sexp
:match-alternatives (vectorp))?

I'm thinking, for instance, of a :type that would fit a display-table
element, which must be either nil or a vector of characters.

Perhaps we could let `repeat' specify `list' or `vector'?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: customization type `vector'
  2006-12-12 21:14 customization type `vector' Drew Adams
@ 2007-07-01 15:33 ` Drew Adams
  2007-07-01 22:10   ` Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2007-07-01 15:33 UTC (permalink / raw)
  To: Emacs-Devel

Resending, since the release is now out.

> From: Drew Adams Sent: Tuesday, December 12, 2006 1:14 PM
> IIUC, customization type `vector', like type `list', can only be 
> used for a fixed number of elements. For lists, you can use
> `repeat' for a list with an arbitrary number of elements, but I
> see no way to do this for vectors.
> 
> Is there some way, for instance, to specify that a value must be 
> a vector of characters? If not, is the only alternative to use
> `sexp' or `restricted-sexp'?
> 
> If so, can this be remedied after the release? If not, what's the 
> best that could be done with, say, `restricted-sexp'? Would it be 
> (restricted-sexp :match-alternatives (vectorp))?
> 
> I'm thinking, for instance, of a :type that would fit a display-table
> element, which must be either nil or a vector of characters.
> 
> Perhaps we could let `repeat' specify `list' or `vector'?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: customization type `vector'
  2007-07-01 15:33 ` Drew Adams
@ 2007-07-01 22:10   ` Drew Adams
  0 siblings, 0 replies; 3+ messages in thread
From: Drew Adams @ 2007-07-01 22:10 UTC (permalink / raw)
  To: Emacs-Devel

I wrote:

> > IIUC, customization type `vector', like type `list', can only be
> > used for a fixed number of elements. For lists, you can use
> > `repeat' for a list with an arbitrary number of elements, but I
> > see no way to do this for vectors.
> >
> > Is there some way, for instance, to specify that a value must be
> > a vector of characters? If not, is the only alternative to use
> > `sexp' or `restricted-sexp'?
> >
> > If so, can this be remedied after the release? If not, what's the
> > best that could be done with, say, `restricted-sexp'? Would it be
> > (restricted-sexp :match-alternatives (vectorp))?
> >
> > I'm thinking, for instance, of a :type that would fit a display-table
> > element, which must be either nil or a vector of characters.
> >
> > Perhaps we could let `repeat' specify `list' or `vector'?

Someone (who presumably wants to remain anonymous) kindly mentioned off list
that this is already possible, as follows:

> (defcustom foo-vector [?f ?o ?o]
>   "A vector of characters, for testing the widget syntax."
>   :type '(vector (repeat :inline t character)))

Thanks! Learning everyday...

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-01 22:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-12 21:14 customization type `vector' Drew Adams
2007-07-01 15:33 ` Drew Adams
2007-07-01 22:10   ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.