GNU bug report logs - #15296
24.3.50; A macro object does not necessarily have `lambda' as its cadr

Previous Next

Package: emacs;

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

Date: Sat, 7 Sep 2013 05:41:02 UTC

Severity: minor

Found in version 24.3.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#15296: closed (24.3.50; A macro object does not necessarily
 have `lambda' as its cadr)
Date: Sun, 08 Sep 2013 18:03:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 08 Sep 2013 14:01:53 -0400
with message-id <jwvd2oj2nwl.fsf-monnier+emacs <at> gnu.org>
and subject line Re: bug#15296: 24.3.50; A macro object does not necessarily have `lambda' as its cadr
has caused the debbugs.gnu.org bug report #15296,
regarding 24.3.50; A macro object does not necessarily have `lambda' as its cadr
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
15296: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15296
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; A macro object does not necessarily have `lambda' as its cadr
Date: Fri, 6 Sep 2013 22:39:58 -0700 (PDT)
AFAICT, (elisp) `Defining Macros' is the closest thing we have to doc
telling you how to test whether a Lisp object is a macro.  There is no
`macro-p' predicate or similar in Emacs Lisp, unless I'm missing
something.  (Shouldn't there be?)

Anyway, this Elisp manual node says that a macro is a list whose car is
`macro' and whose `cdr' is a lambda expression.  That's not true if the
`defmacro' was byte-compiled.  The macro is then a list whose car is `macro'
but whose cdr is byte code, AFAICT.  So this will not work, for example:

(defun macro-p (obj)
  (and (fboundp obj)
       (let ((def  (symbol-function obj)))
         (and (consp def)
              (eq (car def) 'macro)
              (eq (cadr def) 'lambda)))))

In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-08-23 on ODIEONE
Bzr revision: 113986 rgm <at> gnu.org-20130823185841-zoy6h1qk433ibrlf
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 'CFLAGS=-O0 -g3' LDFLAGS=-Lc:/Devel/emacs/lib
 CPPFLAGS=-Ic:/Devel/emacs/include'


[Message part 3 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 15296-done <at> debbugs.gnu.org
Subject: Re: bug#15296: 24.3.50;
 A macro object does not necessarily have `lambda' as its cadr
Date: Sun, 08 Sep 2013 14:01:53 -0400
> `macro' and whose `cdr' is a lambda expression.  That's not true if the

I changed it to say "function" instead.


        Stefan


This bug report was last modified 11 years and 336 days ago.

Previous Next


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