GNU bug report logs - #13316
24.2.50; defmacro might not return the last form, if it is nil

Previous Next

Package: emacs;

Reported by: E Sabof <esabof <at> gmail.com>

Date: Mon, 31 Dec 2012 17:15:02 UTC

Severity: normal

Found in version 24.2.50

Done: Andreas Schwab <schwab <at> linux-m68k.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13316 in the body.
You can then email your comments to 13316 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#13316; Package emacs. (Mon, 31 Dec 2012 17:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to E Sabof <esabof <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 31 Dec 2012 17:15:03 GMT) Full text and rfc822 format available.

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

From: E Sabof <esabof <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.2.50; defmacro might not return the last form, if it is nil
Date: Mon, 31 Dec 2012 03:40:36 +0000
[Message part 1 (text/plain, inline)]
If I write:
(defmacro test-macro () ''a nil)
(test-macro)

I get "a" as a result.

Tested with emacs -Q.
Emacs version: 24.2.50.1 (got it from development repository ~2 months ago)

Evgeni
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13316; Package emacs. (Mon, 31 Dec 2012 17:37:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'E Sabof'" <esabof <at> gmail.com>, <13316 <at> debbugs.gnu.org>
Subject: RE: bug#13316: 24.2.50;
	defmacro might not return the last form, if it is nil
Date: Mon, 31 Dec 2012 09:35:14 -0800
> If I write:
> (defmacro test-macro () ''a nil)
> (test-macro)
>
> I get "a" as a result. 
>
> Tested with emacs -Q. 
> Emacs version: 24.2.50.1 (got it from development repository ~2 months ago)

This is a regression, BTW - it works correctly in Emacs 24.2.
Confirmed in this more recent version:

In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
 of 2012-12-18 on MS-W7-DANI
Bzr revision: 111265 eliz <at> gnu.org-20121218190556-x9wmq083vwecgu0f
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -Ic:/emacs/libs/libXpm-3.5.10/include -Ic:/emacs/libs/libXpm-3.5.10/src
 -Ic:/emacs/libs/libpng-dev_1.4.3-1_win32/include
 -Ic:/emacs/libs/zlib-dev_1.2.5-2_win32/include
 -Ic:/emacs/libs/giflib-4.1.4-1-lib/include
 -Ic:/emacs/libs/jpeg-6b-4-lib/include
 -Ic:/emacs/libs/tiff-3.8.2-1-lib/include
 -Ic:/emacs/libs/libxml2-2.7.8-w32-bin/include/libxml2
 -Ic:/emacs/libs/gnutls-3.0.9-w32-bin/include
 -Ic:/emacs/libs/libiconv-1.9.2-1-lib/include'

(macroexpand '(test-macro)) returns (quote a).

However, with something non-nil in place of nil it DTRT:

(defmacro test-macro () ''a 45)
(test-macro)                ; 45
(macroexpand '(test-macro)) ; 45





Reply sent to Andreas Schwab <schwab <at> linux-m68k.org>:
You have taken responsibility. (Mon, 31 Dec 2012 19:24:02 GMT) Full text and rfc822 format available.

Notification sent to E Sabof <esabof <at> gmail.com>:
bug acknowledged by developer. (Mon, 31 Dec 2012 19:24:02 GMT) Full text and rfc822 format available.

Message #13 received at 13316-done <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: E Sabof <esabof <at> gmail.com>
Cc: 13316-done <at> debbugs.gnu.org
Subject: Re: bug#13316: 24.2.50;
	defmacro might not return the last form, if it is nil
Date: Mon, 31 Dec 2012 20:22:17 +0100
Fixed on emacs-24.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 29 Jan 2013 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 145 days ago.

Previous Next


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