[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Adding customization types
From: |
Drew Adams |
Subject: |
RE: Adding customization types |
Date: |
Tue, 19 Sep 2017 17:01:56 -0700 (PDT) |
> PE> One of the widget (or type), I would like to get is major-mode and
> PE> probably minor-mode too. Is there any reason why it was never included?
>
> EP> Given we could know if a symbol is a major-mode, would it be okay if I
> PE> made a patch for that (to be included in `wid-edit.el`)?
>
> This sounds useful to me.
>
> I also briefly looked for a general way to say "symbols matching a
> predicate", for one-off types similar to the above request. Is that possible?
1. Do you mean for completion when entering a symbol value for a
field? If so, I don't think that has been implemented.
(In fact, it seem that if you try using `M-TAB' in such a
field you get the inappropriate error message "Not in an
editable field", instead of a more appropriate message
telling you that completion is not available in that field.
That seems like a bug in `widget-complete'.)
2. Do you instead mean a way to restrict a field value to be
a symbol that matches a given predicate? If so, yes, you
can do that using custom type `restricted-sexp'.