all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "John Wiegley" <jwiegley@gmail.com>,
	"Etienne Prud’homme" <e.e.f.prudhomme@gmail.com>
Cc: emacs-devel@gnu.org
Subject: RE: Adding customization types
Date: Tue, 19 Sep 2017 17:01:56 -0700 (PDT)	[thread overview]
Message-ID: <b702f40c-312c-4f2b-994f-8ee9f15b83b9@default> (raw)
In-Reply-To: <m2377iw8p0.fsf@newartisans.com>

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



      reply	other threads:[~2017-09-20  0:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15 21:07 Adding customization types Etienne Prud’homme
2017-09-19 23:49 ` John Wiegley
2017-09-20  0:01   ` Drew Adams [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b702f40c-312c-4f2b-994f-8ee9f15b83b9@default \
    --to=drew.adams@oracle.com \
    --cc=e.e.f.prudhomme@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=jwiegley@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.