From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/55820 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: how to turn this Gnus function into a macro? Date: Wed, 07 Jan 2004 19:09:53 -0500 Organization: =?koi8-r?q?=F4=C5=CF=C4=CF=D2=20=FA=CC=C1=D4=C1=CE=CF=D7?= @ Cienfuegos Sender: ding-owner@lists.math.uh.edu Message-ID: <4nekubb8ry.fsf@collins.bwh.harvard.edu> References: <4noetfo10c.fsf@collins.bwh.harvard.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1073520697 25334 80.91.224.253 (8 Jan 2004 00:11:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Jan 2004 00:11:37 +0000 (UTC) Original-X-From: ding-owner+M4360@lists.math.uh.edu Thu Jan 08 01:11:30 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 1AeNlq-00013P-00 for ; Thu, 08 Jan 2004 01:11:30 +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 1AeNlZ-0002Gg-00; Wed, 07 Jan 2004 18:11:13 -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 1AeNlQ-0002GY-00 for ding@lists.math.uh.edu; Wed, 07 Jan 2004 18:11:04 -0600 Original-Received: from clifford.bwh.harvard.edu (clifford.bwh.harvard.edu [134.174.9.41]) by justine.libertine.org (Postfix) with ESMTP id 094113A0050 for ; Wed, 7 Jan 2004 18:11:04 -0600 (CST) Original-Received: from collins.bwh.harvard.edu (collins [134.174.9.80]) by clifford.bwh.harvard.edu (8.10.2+Sun/8.11.0) with ESMTP id i0809xW03871 for ; Wed, 7 Jan 2004 19:09:59 -0500 (EST) Original-Received: from collins.bwh.harvard.edu (localhost [127.0.0.1]) by collins.bwh.harvard.edu (8.12.9+Sun/8.11.0) with ESMTP id i0809suB027027 for ; Wed, 7 Jan 2004 19:09:54 -0500 (EST) Original-Received: (from tzz@localhost) by collins.bwh.harvard.edu (8.12.9+Sun/8.12.9/Submit) id i0809sQ3027024; Wed, 7 Jan 2004 19:09:54 -0500 (EST) Original-To: Ding Mailing List X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Followup-To: Ding Mailing List In-Reply-To: (Jesper Harder's message of "Wed, 07 Jan 2004 23:55:19 +0100") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (usg-unix-v) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:55820 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:55820 On Wed, 07 Jan 2004, harder@ifa.au.dk wrote: > Ted Zlatanov writes: > >> I tried to make this function into a macro but failed. Any help >> will be greatly appreciated. > > Why do you want it as a macro? If it's just to save a function > call, then `inline' or `defsubst' is better. Because it can be much simpler, in the form ;; field is 'from or 'message-id for instance (eval (format "mail-header-%s" (symbol-name field))) Only a few lines, and it could be used with anything as the field, instead of the hard-coded field names I have now. It also seemed like an interesting challenge, but I failed it pretty badly :) > Named macros cannot be funcalled. So you probably haven't missed > anything -- except that fact :-) That's what I figured, too. Actually I also ran into this while updating spam-check-BBDB and ended up including the expanded macro calls that look up a name or address in the BBDB hashtable inside spam.el. Ted