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

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

custom on special option


From: Miguel Frasson
Subject: custom on special option
Date: 26 Jan 2004 23:01:40 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Hello.

I want to defcustom an option that is a list that may contain only some
specific symbols (say red, yellow, green), one symbol can appear only
once, or any sexp that does not match any specific symbols. For example,
nil and (red (blablabla) yellow) are valid values, but (green green)
shouldn't be, but I will not care. 

Actually the values different from the specific symbols are meant
to appear rarely and I don't want to spend too much energy with them, for
example I will not care if user actually inserts in the sexp another of
the specific symbols.

I would like in the customization of the option, the user could see INS
and DEL buttons to add/remove elements, and in each element, the "Value
menu" should show only those specific elements that are not already in the
previous/following itens (because the variable allows only 1 or 0 of each
symbol), and "Other" to insert the sexp. Not that I don't mean the symbols
that appear in the SET variable, but that symbols selected meanwhile it is
set.

Example:

The variable is nil (for example). Then I INS, and in the "Value menu" I
see "red, yellow, green, other". I select "green". Then I INS another
element, and I see in the value menu "red, yellow, other". Etc. 
 
Is there a way to custom such option?

[]'s

Miguel.

-- 
Miguel Vinicius Santini Frasson
http://www.math.leidenuniv.nl/~frasson


reply via email to

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