Gnus development mailing list
 help / color / mirror / Atom feed
* where does this belong?
@ 2002-03-27  0:18 Paul Jarc
  2002-03-27  8:57 ` Kai Großjohann
  2002-03-27 10:17 ` Simon Josefsson
  0 siblings, 2 replies; 8+ messages in thread
From: Paul Jarc @ 2002-03-27  0:18 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-03-28  2:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-27  0:18 where does this belong? Paul Jarc
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

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).