help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: Specifying plist requirements in defcustom?


From: Drew Adams
Subject: RE: Specifying plist requirements in defcustom?
Date: Wed, 15 Oct 2008 07:50:24 -0700

> > (defcustom corext-enlistments nil
> >   "..."
> >   :type
> >   '(repeat
> >     (restricted-sexp
> >      :match-alternatives
> >      ((lambda (x) (and (symbolp x)
> >                        (let ((pl (symbol-plist x)))
> >                          (and (plist-get pl 'branch)
> >                               (plist-get pl 'drive)
> >                               (plist-get pl 'path)))))))))
> >
> From what I could tell, this worked, but I was also to have a user-
> friendly customization interface when a user, say, clicked customoize
> corext-enlistments.  I'd like a prompt for the symbol-name, and the
> individual property list values: branch, drive, and path.  It seems
> that to acheive something like this, I'd need to just make them
> alists....

You'll have to extend Customize to get that, AFAIK. Or write your own command to
customize this particular option. Customize doesn't really guide you with
prompts and such. Customize could use a little more guidance, especially for
complex structures such as this one.

There are a lot of ways in which Customize could be improved, but no one seems
to want to work on it. Many Emacs developers have, I think, written it off as
being either (1) superfluous (~real Emacs users don't use Customize~, meaning
that they don't use it) or (2) too difficult/bothersome (the Customize code is
hard to follow). No flames please - that's just one person's impression.





reply via email to

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