From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: elisp macros problem Date: Mon, 26 Jul 2004 00:49:26 -0400 Organization: Symantec Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1090817544 16360 80.91.224.253 (26 Jul 2004 04:52:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Jul 2004 04:52:24 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 26 06:52:06 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BoxT4-0003eI-00 for ; Mon, 26 Jul 2004 06:52:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BoxW5-0008R2-J6 for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Jul 2004 00:55:13 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Sun, 25 Jul 2004 23:49:26 -0500 Original-Newsgroups: gnu.emacs.help,comp.lang.lisp Mail-Copies-To: nobody User-Agent: MT-NewsWatcher/3.4 (PPC Mac OS X) X-Copies-To: never Original-Lines: 39 Original-NNTP-Posting-Host: 24.128.26.140 Original-X-Trace: sv3-AdFboe+bWI2j93QPHet/Rg6lwvaprFpwdt5xtRzrtRjRT6CP8LEeFrL4FVuVCUR9YDSJkLrf0Blvdv5!8zXNcX75fyDQLn0qmanxdupecN/VU1JP3ERYLMv0ZVlB9ki21SbfozSY3RorI5wEdKqlqEwKCSKv!xqNTXNYjZj8= Original-X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Original-Xref: shelby.stanford.edu gnu.emacs.help:124456 comp.lang.lisp:144206 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 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 Xref: main.gmane.org gmane.emacs.help:19792 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19792 In article , Lowell Kirsh wrote: > Yes, I have been making sure to quote the list, but it doesn't seem to > work at all. I've also tried to macroexpand the forms I'm evaluating but > the minibuffer just shows a condensed version of the expansion with lots > of '...' placeholders. Is there a simple way to macroexpand and pretty > print a form without the '...'s ? Use the *scratch* buffer for a better interface to the Emacs Lisp R-E-P loop. > > Lowell > > Barry Margolin wrote: > > In article , > > Lowell Kirsh wrote: > > > > > >>Why does this not work: > >> > >>(defmacro my-add-hooks (hooks &rest body) > >> `(dolist (hook ,hooks) > >> (my-add-hook hook ,@body))) > >> > >>?? > > > > > > It looks like it should work to me. Make sure you quote the list of > > hooks when calling it, e.g. > > > > (my-add-hooks '(emacs-lisp lisp) (local-set-key ...)) > > -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***