[Top][All Lists]

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

Re: elisp macros problem

From: Lowell Kirsh
Subject: Re: elisp macros problem
Date: Sun, 25 Jul 2004 20:06:31 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040322

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 ?


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 ...))

reply via email to

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