From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jrwats Newsgroups: gmane.emacs.help Subject: Specifying plist requirements in defcustom? Date: Sun, 12 Oct 2008 13:46:34 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1223847649 4655 80.91.229.12 (12 Oct 2008 21:40:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 12 Oct 2008 21:40:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 12 23:41:49 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kp8h8-0001OY-UU for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Oct 2008 23:41:47 +0200 Original-Received: from localhost ([127.0.0.1]:47047 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kp8g4-0007vP-H9 for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Oct 2008 17:40:40 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!v39g2000pro.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-NNTP-Posting-Host: 24.18.202.1 Original-X-Trace: posting.google.com 1223844395 27926 127.0.0.1 (12 Oct 2008 20:46:35 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sun, 12 Oct 2008 20:46:35 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v39g2000pro.googlegroups.com; posting-host=24.18.202.1; posting-account=bFjqRgoAAAA1g2eFs8HouoaeO5EHoWR2 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.0.3) Gecko/2008092416 Firefox/3.0.3,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:163368 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58709 Archived-At: 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 ) 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 drive path ). 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)))