Gnus development mailing list
 help / color / mirror / Atom feed
From: prj@po.cwru.edu (Paul Jarc)
Subject: where does this belong?
Date: Tue, 26 Mar 2002 19:18:40 -0500	[thread overview]
Message-ID: <m3it7i50cp.fsf@multivac.cwru.edu> (raw)

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



             reply	other threads:[~2002-03-27  0:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-27  0:18 Paul Jarc [this message]
2002-03-27  8:57 ` Kai Großjohann
2002-03-27 10:17 ` Simon Josefsson
2002-03-27 10:27   ` Daniel Pittman
2002-03-27 16:06     ` Paul Jarc
2002-03-27 17:16       ` Kai Großjohann
2002-03-27 19:13         ` Paul Jarc
2002-03-28  2:09       ` Daniel Pittman

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3it7i50cp.fsf@multivac.cwru.edu \
    --to=prj@po.cwru.edu \
    /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 NNTP newsgroup(s).