[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Need Help defining customizable objects
From: |
Philippe M . Coatmeur |
Subject: |
Need Help defining customizable objects |
Date: |
Wed, 13 Jun 2012 17:18:30 +0000 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) Emacs/24.1 Mule/6.0 (HANACHIRUSATO) |
Hi ; I need to setup a customizable system where the user can insert,
delete and set a series of "accounts", one account being a (editable)
name, and a fixed-size (5) list of key-values, and only the value
would be editable.
I did my homework, read the manual and related pages
(http://original.jamesthornton.com/emacs/elisp/chapter/elisp_14.html)
and been playing with custom definitions all morning but so far I
could only muster this :
(defcustom mail-bug-accounts '(("host" "")
("port" "")
("box" "")
("icon" ""))
"Alist of mail-bug-accounts."
:type '(alist :value-type (repeat string))
:group 'mail-bug)
But this produces this :
Hide Mail Bug Accounts:
INS DEL Key: "host"
Repeat:
INS DEL String:
INS
INS DEL Key: "port"
Repeat:
INS DEL String:
INS
INS DEL Key: "box"
Repeat:
INS DEL String:
INS
INS DEL Key: "icon"
Repeat:
INS DEL String:
INS
INS
State : STANDARD.
Alist of mail-bug-accounts
Groups: Mail Bug
A list where the user can insert, delete and set key-values, but not
accounts, so basically it's the opposite of what I want. Also the keys
are called "keys", when I'd like to name them.
How can I produce a (editable : ins, del, set) list of (non-fully-editable)
lists?
Bonus question : Once the user sets a few of those "account" objects,
how will they be sorted, and is there a way to sort them ?
Philippe
- Need Help defining customizable objects,
Philippe M . Coatmeur <=