From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/55828 Path: main.gmane.org!not-for-mail From: Jeremy Maitin-Shepard Newsgroups: gmane.emacs.gnus.general Subject: Re: how to turn this Gnus function into a macro? Date: Wed, 07 Jan 2004 23:06:37 -0500 Sender: ding-owner@lists.math.uh.edu Message-ID: <87fzerqe2a.fsf@jbms.ath.cx> References: <4noetfo10c.fsf@collins.bwh.harvard.edu> <4n8ykjazla.fsf@collins.bwh.harvard.edu> <87k743qf5t.fsf@jbms.ath.cx> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: sea.gmane.org 1073534656 15074 80.91.224.253 (8 Jan 2004 04:04:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Jan 2004 04:04:16 +0000 (UTC) Original-X-From: ding-owner+M4368@lists.math.uh.edu Thu Jan 08 05:04:14 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AeRP4-0002jN-00 for ; Thu, 08 Jan 2004 05:04:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1AeROs-0003T0-00; Wed, 07 Jan 2004 22:04:02 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1AeROk-0003Su-00 for ding@lists.math.uh.edu; Wed, 07 Jan 2004 22:03:54 -0600 Original-Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by justine.libertine.org (Postfix) with ESMTP id 9F8F73A005B for ; Wed, 7 Jan 2004 22:03:53 -0600 (CST) Original-Received: from jay.local.invalid (h00105aa5eefe.ne.client2.attbi.com[24.91.123.131]) by comcast.net (rwcrmhc12) with ESMTP id <2004010804035201400rqm2te>; Thu, 8 Jan 2004 04:03:52 +0000 Original-Received: by jay.local.invalid (Postfix, from userid 1000) id 840B322A402; Wed, 7 Jan 2004 23:06:37 -0500 (EST) Original-To: ding@gnus.org In-Reply-To: (Katsumi Yamaoka's message of "Thu, 08 Jan 2004 12:47:39 +0900") User-Agent: Gnus/5.1005 (Gnus v5.10.5) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:55828 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:55828 Katsumi Yamaoka 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