From: jrwats <jrwats@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Specifying plist requirements in defcustom?
Date: Sun, 12 Oct 2008 13:46:34 -0700 (PDT) [thread overview]
Message-ID: <b3c6ed71-c113-41cd-9530-a18758d44754@v39g2000pro.googlegroups.com> (raw)
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)))
next reply other threads:[~2008-10-12 20:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-12 20:46 jrwats [this message]
2008-10-12 23:18 ` Specifying plist requirements in defcustom? Lennart Borgman (gmail)
2008-10-13 1:31 ` Drew Adams
[not found] ` <mailman.901.1223861517.25473.help-gnu-emacs@gnu.org>
2008-10-15 14:32 ` jrwats
2008-10-15 14:50 ` Drew Adams
2008-10-15 14:54 ` Lennart Borgman (gmail)
2008-10-15 15:41 ` Drew Adams
[not found] ` <mailman.1123.1224085332.25473.help-gnu-emacs@gnu.org>
2008-10-15 16:27 ` jrwats
2008-10-15 16:33 ` jrwats
2008-10-15 16:48 ` jrwats
2008-10-15 16:58 ` Drew Adams
[not found] ` <mailman.1126.1224089933.25473.help-gnu-emacs@gnu.org>
2008-10-15 17:43 ` jrwats
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b3c6ed71-c113-41cd-9530-a18758d44754@v39g2000pro.googlegroups.com \
--to=jrwats@gmail.com \
--cc=help-gnu-emacs@gnu.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).