help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: elisp macros problem


From: Barry Margolin
Subject: Re: elisp macros problem
Date: Mon, 26 Jul 2004 00:49:26 -0400
User-agent: MT-NewsWatcher/3.4 (PPC Mac OS X)

In article <address@hidden>,
 Lowell Kirsh <address@hidden> 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 <address@hidden>,
> >  Lowell Kirsh <address@hidden> 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, address@hidden
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

[Prev in Thread] Current Thread [Next in Thread]