[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: customization type `vector'

From: Drew Adams
Subject: RE: customization type `vector'
Date: Sun, 1 Jul 2007 15:10:08 -0700

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]