From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.devel Subject: Re: Macro vs Function Date: Wed, 12 Apr 2006 17:17:19 +0800 Message-ID: References: <85y7yb40wr.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1144833468 2478 80.91.229.2 (12 Apr 2006 09:17:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 Apr 2006 09:17:48 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 12 11:17:43 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FTbTl-0003tk-Ld for ged-emacs-devel@m.gmane.org; Wed, 12 Apr 2006 11:17:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTbTl-0006Ap-3V for ged-emacs-devel@m.gmane.org; Wed, 12 Apr 2006 05:17:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FTbTX-0006AU-58 for emacs-devel@gnu.org; Wed, 12 Apr 2006 05:17:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FTbTV-0006A6-B3 for emacs-devel@gnu.org; Wed, 12 Apr 2006 05:17:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTbTV-00069z-7E for emacs-devel@gnu.org; Wed, 12 Apr 2006 05:17:21 -0400 Original-Received: from [64.4.26.45] (helo=hotmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FTbYY-0003Om-3p; Wed, 12 Apr 2006 05:22:34 -0400 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 12 Apr 2006 02:17:19 -0700 Original-Received: from 64.4.26.200 by by112fd.bay112.hotmail.msn.com with HTTP; Wed, 12 Apr 2006 09:17:19 GMT X-Originating-IP: [202.165.107.100] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: <85y7yb40wr.fsf@lola.goethe.zz> Original-To: dak@gnu.org X-OriginalArrivalTime: 12 Apr 2006 09:17:19.0373 (UTC) FILETIME=[E60D63D0:01C65E11] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52739 Archived-At: >From: David Kastrup >To: "Herbert Euler" >CC: emacs-devel@gnu.org >Subject: Re: Macro vs Function >Date: Wed, 12 Apr 2006 11:07:48 +0200 > >The macro is executed at function definition time, the function >at execution time. Sorry I don't quite understand this. Could you please explain it? Thanks. But the following two programs seem to be same: (defun g () nil) ;; macro (defmacro m (a) (if a t nil)) (m (g)) ;; function (defun f (a) (if a t nil)) (f '(g)) And, these two seem to be same as well: ;; macro (defmacro m (a) (if (eval a) t nil)) (m (g)) ;; function (defun f (a) (if (eval a) t nil)) (f '(g)) Regards, Guanpeng Xu _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/