From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: never use `eval' (was: Re: How to mapcar or across a list?) Date: Wed, 15 Jul 2015 20:04:23 -0400 Organization: A noiseless patient Spider Message-ID: References: <87io9lmb4z.fsf@mbork.pl> <87oajdkqc7.fsf@kuiper.lan.informatimago.com> <87vbdlt4g3.fsf_-_@nl106-137-147.student.uu.se> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1437005123 16630 80.91.229.3 (16 Jul 2015 00:05:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Jul 2015 00:05:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 16 02:05:22 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZFWfx-0002l4-Uq for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Jul 2015 02:05:22 +0200 Original-Received: from localhost ([::1]:37866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFWfx-0007Ap-13 for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jul 2015 20:05:21 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!barmar.motzarella.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Injection-Info: barmar.motzarella.org; posting-host="2be9e9f5dd9af768b8861af71b85fc28"; logging-data="26060"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1DreLAh3VeThg0K22ttE1" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:oHEzdSIbVpG6pvF5JY36NDkk1fY= Original-Xref: usenet.stanford.edu gnu.emacs.help:213468 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105753 Archived-At: In article , Emanuel Berg wrote: > John Mastro writes: > > > I would use something like this: > > > > (defmacro ... > > Macros never liked me, and that is mutual. Are they > really preferrable to `eval'? > > > For this (and others like it) > > ... which are? Do you mean the eval + backquote combo? > > > it looks like you could instead simply use e.g. > > (apply #'create-book nil title data) > > This is what it looks like: > > (eval `(create-book nil ,title ,@data)) > > With `apply', won't the last "data" be a list, i.e. > > (a b ... n) > > instead of > > a b ... n > > ? No. apply spreads its last argument. You're thinking of funcall. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***