GNU bug report logs - #8712
24.0.50; getting the "Forgot to expand macro XXXX" error - problem? solution?

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sat, 21 May 2011 21:02:02 UTC

Severity: normal

Found in version 24.0.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 8712 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 8712 <at> debbugs.gnu.org
Subject: Re: bug#8712: 24.0.50;
	getting the "Forgot to expand macro XXXX" error - problem? solution?
Date: Sun, 22 May 2011 22:36:34 -0300
> I do have a question about the follownig warning, however (which I have not
> seen/noticed before):

>  (lambda (opt) ...) quoted with ' rather than with #'

> That presumably comes from a defmacro that has, in effect, this:

>  ` ... (let* (... (something (lambda (opt)...))))

This is because you pass (lambda (opt) ...) as `function' argument
to a macro that then splices it with

  `(.... ',function ....)

so the expanded code contains '(lambda (opt) ...).
Splice it with #', instead.

> That is, an unquoted lambda inside a backquote.  The backquote expands
> to (quote (lambda...)) no doubt.

No, backquote does not know you're building code, so it can't freely
decide to add `quote' symbols as it sees fit.


        Stefan




This bug report was last modified 13 years and 315 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.