Gnus development mailing list
 help / color / mirror / Atom feed
From: Jeremy Maitin-Shepard <jbms@attbi.com>
Subject: Re: how to turn this Gnus function into a macro?
Date: Wed, 07 Jan 2004 23:06:37 -0500	[thread overview]
Message-ID: <87fzerqe2a.fsf@jbms.ath.cx> (raw)
In-Reply-To: <b9ybrpf2jac.fsf@jpl.org> (Katsumi Yamaoka's message of "Thu, 08 Jan 2004 12:47:39 +0900")

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> [snip: macro-eval-time symbol interning example]

> Unfortunately, it dosn't work for all `field's.

> (macroexpand '(spam-fetch-field-fast ART FIELD))
>  => (let ((article ART))
>       (if (numberp article)
> 	  (let* ((header (assoc article (gnus-data-list nil)))
> 		 (data-header (if header (gnus-data-header header))))
> 	    (mail-header-FIELD data-header))))

> BTW, (eval '(MACRO ARG)) can be used, however it is four times
> slower than (MACRO ARG).

Indeed, if the field cannot always be specified as a compile-time
constant symbol, this type of approach is simply not very useful.
Special casing via `cond', as in your example, is more appropriate.

-- 
Jeremy Maitin-Shepard



  reply	other threads:[~2004-01-08  4:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-07 22:19 Ted Zlatanov
2004-01-07 22:55 ` Jesper Harder
2004-01-08  0:09   ` Ted Zlatanov
2004-01-08  4:13     ` Jesper Harder
2004-01-08  2:13 ` Katsumi Yamaoka
2004-01-08  3:28   ` Ted Zlatanov
2004-01-08  3:33     ` Katsumi Yamaoka
2004-01-08  3:42     ` Jeremy Maitin-Shepard
2004-01-08  3:47       ` Katsumi Yamaoka
2004-01-08  4:06         ` Jeremy Maitin-Shepard [this message]
2004-01-08  6:06         ` Katsumi Yamaoka
2004-01-08 20:30           ` Ted Zlatanov

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=87fzerqe2a.fsf@jbms.ath.cx \
    --to=jbms@attbi.com \
    /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).