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

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

Re: Programmatically access all the possible values of a defcustom


From: Nicolas Richard
Subject: Re: Programmatically access all the possible values of a defcustom
Date: Wed, 29 Jan 2014 23:19:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)


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 via email to

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