From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/44030 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.emacs.gnus.general Subject: where does this belong? Date: Tue, 26 Mar 2002 19:18:40 -0500 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1017188457 12076 127.0.0.1 (27 Mar 2002 00:20:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 27 Mar 2002 00:20:57 +0000 (UTC) Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16q1BR-00038f-00 for ; Wed, 27 Mar 2002 01:20:57 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16q19h-0006ug-00; Tue, 26 Mar 2002 18:19:09 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 26 Mar 2002 18:19:14 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id SAA02816 for ; Tue, 26 Mar 2002 18:19:04 -0600 (CST) Original-Received: (qmail 18288 invoked by alias); 27 Mar 2002 00:18:54 -0000 Original-Received: (qmail 18283 invoked from network); 27 Mar 2002 00:18:54 -0000 Original-Received: from multivac.student.cwru.edu (HELO multivac.cwru.edu) (qmailr@129.22.96.25) by gnus.org with SMTP; 27 Mar 2002 00:18:54 -0000 Original-Received: (qmail 26669 invoked by uid 500); 27 Mar 2002 00:19:03 -0000 Original-To: ding@gnus.org Mail-Copies-To: nobody Mail-Followup-To: ding@gnus.org Original-Lines: 23 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/20.7 (i386-redhat-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:44030 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:44030 I came up with a meta-macro called nnmaildir--defstruct for defining data structures. Sample use: (nnmaildir--defstruct nnmaildir--srv [address ;; the server address string method ;; the select method ... ]) This defines macros such as nnmaildir--srv-get-address and nnmaildir--srv-set-address which expand to aref and aset forms, much like the gnus-info-* macros, complete with automatic docstrings. This makes for less typing and prevents me from accidentally using a different index in the -get- and -set- macros for the same member of a data structure. After I wrote this, I realized its usefulness really isn't limited to nnmaildir. E.g., the gnus-info-* macros could maybe be reimplemented with this. So where would be a good place for it? gnus-util.el? gnus.el? paul