all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
To: "Sebastien Vauban"
	<public-sva-news-D0wtAvR13HarG/iDocfnWg@plane.gmane.org>
Cc: public-help-gnu-emacs-mXXj517/zsQ@plane.gmane.org
Subject: Re: Programmatically access all the possible values of a defcustom
Date: Wed, 29 Jan 2014 23:19:02 +0100	[thread overview]
Message-ID: <871tzqh1nt.fsf@yahoo.fr> (raw)
In-Reply-To: <86fvo6jzx5.fsf@somewhere.org> (Sebastien Vauban's message of "Wed, 29 Jan 2014 21:28:22 +0100")



Hi Sébastien,

"Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
writes:
> Is there a possibility to programmatically access all the values that
> a defcustom can take?

I guess it's in the plist associated to the symbol. Let's check:
(symbol-plist 'org-babel-load-languages)

Ah ha!

(get 'org-babel-load-languages 'custom-type)
=> (alist :tag "Babel Languages" :key-type (choice (const :tag "Awk" awk) (const :tag "C" C) (const :tag "R" R) (const :tag "Asymptote" asymptote) (const :tag "Calc" calc) (const :tag "Clojure" clojure) (const :tag "CSS" css) (const :tag "Ditaa" ditaa) (const :tag "Dot" dot) (const :tag "Emacs Lisp" emacs-lisp) (const :tag "Fortran" fortran) ...) :value-type (boolean :tag "Activate" :value t))

HTH,

-- 
Nico.




  reply	other threads:[~2014-01-29 22:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29 20:28 Programmatically access all the possible values of a defcustom Sebastien Vauban
2014-01-29 22:19 ` Nicolas Richard [this message]
     [not found] ` <mailman.13125.1391033975.10748.help-gnu-emacs@gnu.org>
2014-01-30 10:17   ` Sebastien Vauban
2014-01-30 11:41     ` Nicolas Richard
     [not found]     ` <mailman.13179.1391082135.10748.help-gnu-emacs@gnu.org>
2014-01-30 12:40       ` Sebastien Vauban

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=871tzqh1nt.fsf@yahoo.fr \
    --to=theonewiththeevillook@yahoo.fr \
    --cc=public-help-gnu-emacs-mXXj517/zsQ@plane.gmane.org \
    --cc=public-sva-news-D0wtAvR13HarG/iDocfnWg@plane.gmane.org \
    /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.