[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Specifying plist requirements in defcustom?
From: |
jrwats |
Subject: |
Specifying plist requirements in defcustom? |
Date: |
Sun, 12 Oct 2008 13:46:34 -0700 (PDT) |
User-agent: |
G2/1.0 |
I want to have a customization type that is a list of symbols, and I
want those symbols to have certain plist requirements fulfilled. Is
there a way to specify this kind of requirement like
(defcustom :type <complicated requirement goes here>)
I know you can have a plist type, but the true type of the customized
variable is '(repeat (symbol)). And I want a certain plist for these
symbols. For what it's worth, my plist is (branch <a string> drive <a
string> path <a string>). As an example, here's how I set the
variable:
;; I'd like this to be defcustom
(defvar corext-enlistments nil
"list of enlistments where each enlistment has a property list of:
branch, drive, and directory")
;;name (symbol - this is arbitrary), branch (string), drive (string),
path (string)
(corext-set-enlistments '((wcdeskcomm "working.client.dekscomm"
"e:" "e:\\wcdeskcomm")
(wcdc
"working.client.dcplatform" "e:" "e:\\wcdc")))
(defun corext-set-enlistments (enlistment-list)
(setq corext-enlistments
(mapcar (lambda (arg-list)
(apply (lambda (new-enlistment pbranch pdrive ppath)
(setplist new-enlistment `(branch ,pbranch
drive ,pdrive path ,ppath))
new-enlistment)
arg-list))
enlistment-list)))
- Specifying plist requirements in defcustom?,
jrwats <=
- Re: Specifying plist requirements in defcustom?, Lennart Borgman (gmail), 2008/10/12
- RE: Specifying plist requirements in defcustom?, Drew Adams, 2008/10/12
- Message not available
- Re: Specifying plist requirements in defcustom?, jrwats, 2008/10/15
- RE: Specifying plist requirements in defcustom?, Drew Adams, 2008/10/15
- Re: Specifying plist requirements in defcustom?, Lennart Borgman (gmail), 2008/10/15
- RE: Specifying plist requirements in defcustom?, Drew Adams, 2008/10/15
- Message not available
- Re: Specifying plist requirements in defcustom?, jrwats, 2008/10/15
- Re: Specifying plist requirements in defcustom?, jrwats, 2008/10/15
- Re: Specifying plist requirements in defcustom?, jrwats, 2008/10/15
- RE: Specifying plist requirements in defcustom?, Drew Adams, 2008/10/15