From unknown Fri Sep 05 20:37:31 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#15296 <15296@debbugs.gnu.org> To: bug#15296 <15296@debbugs.gnu.org> Subject: Status: 24.3.50; A macro object does not necessarily have `lambda' as its cadr Reply-To: bug#15296 <15296@debbugs.gnu.org> Date: Sat, 06 Sep 2025 03:37:31 +0000 retitle 15296 24.3.50; A macro object does not necessarily have `lambda' as= its cadr reassign 15296 emacs submitter 15296 Drew Adams severity 15296 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 07 01:40:53 2013 Received: (at submit) by debbugs.gnu.org; 7 Sep 2013 05:40:53 +0000 Received: from localhost ([127.0.0.1]:45722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VIBGO-0006un-VW for submit@debbugs.gnu.org; Sat, 07 Sep 2013 01:40:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50840) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VIBG7-0006uB-NG for submit@debbugs.gnu.org; Sat, 07 Sep 2013 01:40:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VIBFr-0008Ux-VK for submit@debbugs.gnu.org; Sat, 07 Sep 2013 01:40:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIBFr-0008Uo-SW for submit@debbugs.gnu.org; Sat, 07 Sep 2013 01:40:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIBFj-0001px-7L for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2013 01:40:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VIBFa-0008BR-B3 for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2013 01:40:11 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:42825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIBFa-00087Y-2K for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2013 01:40:02 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r875dxJb011065 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 7 Sep 2013 05:40:00 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r875dxLK014282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 7 Sep 2013 05:39:59 GMT Received: from abhmt112.oracle.com (abhmt112.oracle.com [141.146.116.64]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r875dwSG022831 for ; Sat, 7 Sep 2013 05:39:58 GMT MIME-Version: 1.0 Message-ID: <8d69314c-7324-4751-b7c2-ee1a26645afb@default> Date: Fri, 6 Sep 2013 22:39:58 -0700 (PDT) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 24.3.50; A macro object does not necessarily have `lambda' as its cadr X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) 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@gnu.org-20130823185841-zoy6h1qk433ibrlf Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/Devel/emacs/binary --enable-checking=3Dyes,glyphs 'CFLAGS=3D-O0 -g3' LDFLAGS=3D-Lc:/Devel/emacs/lib CPPFLAGS=3D-Ic:/Devel/emacs/include' From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 07 07:34:40 2013 Received: (at 15296) by debbugs.gnu.org; 7 Sep 2013 11:34:40 +0000 Received: from localhost ([127.0.0.1]:46399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VIGmm-00004q-7U for submit@debbugs.gnu.org; Sat, 07 Sep 2013 07:34:40 -0400 Received: from mout.web.de ([212.227.15.14]:51921) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VIGmj-0008WG-SG for 15296@debbugs.gnu.org; Sat, 07 Sep 2013 07:34:38 -0400 Received: from drachen.dragon ([2.201.250.252]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0MYvxn-1VUlEr35Up-00Veoy for <15296@debbugs.gnu.org>; Sat, 07 Sep 2013 13:34:31 +0200 From: Michael Heerdegen To: Drew Adams Subject: Re: bug#15296: 24.3.50; A macro object does not necessarily have `lambda' as its cadr References: <8d69314c-7324-4751-b7c2-ee1a26645afb@default> Date: Sat, 07 Sep 2013 13:34:27 +0200 In-Reply-To: <8d69314c-7324-4751-b7c2-ee1a26645afb@default> (Drew Adams's message of "Fri, 6 Sep 2013 22:39:58 -0700 (PDT)") Message-ID: <87zjrozwzg.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:EX2IVojjttvclQgtC5EtB7Rq+LPR6se7DtDjRzX0Y2SR1mSUDdH UFG2vA/wlKWTo0fPa9nOArBXCnjDF0bGm9w0faSuT33dMs9TCkaqL6/NI9FLbZHbB/qJ0Gg HFyz0HIfBFMgVoLv97es/nEBNZd3wdS/0s/8nj0U8A62XXCFGdbNCs9EYx9aTtXMhz7th5M nTy9Qe/Bhnlvle6DjEtOw== X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 15296 Cc: 15296@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Drew Adams writes: > 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?) There is `macrop' in subr.el (since some months ago, I think). > 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. Confusing, indeed. Michael. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 07 10:23:52 2013 Received: (at 15296) by debbugs.gnu.org; 7 Sep 2013 14:23:52 +0000 Received: from localhost ([127.0.0.1]:46930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VIJQV-0004M0-Nf for submit@debbugs.gnu.org; Sat, 07 Sep 2013 10:23:52 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:50100) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VIJQT-0004Ll-JC for 15296@debbugs.gnu.org; Sat, 07 Sep 2013 10:23:50 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r87ENgNA031362 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 7 Sep 2013 14:23:43 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r87ENfJ5009998 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 7 Sep 2013 14:23:42 GMT Received: from abhmt109.oracle.com (abhmt109.oracle.com [141.146.116.61]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r87ENfxb009993; Sat, 7 Sep 2013 14:23:41 GMT MIME-Version: 1.0 Message-ID: <3633cc3f-1b4c-4d4e-a27f-e3c5be9735c7@default> Date: Sat, 7 Sep 2013 07:23:39 -0700 (PDT) From: Drew Adams To: Michael Heerdegen Subject: RE: bug#15296: 24.3.50; A macro object does not necessarily have `lambda' as its cadr References: <8d69314c-7324-4751-b7c2-ee1a26645afb@default> <87zjrozwzg.fsf@web.de> In-Reply-To: <87zjrozwzg.fsf@web.de> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -4.7 (----) X-Debbugs-Envelope-To: 15296 Cc: 15296@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.7 (----) > > 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?) >=20 > There is `macrop' in subr.el (since some months ago, I think). Wow, that's weird. And thank you. That was the first thing I looked for (the second was `macro-p'), and for some reason I didn't find it (and I'm using only a recent Emacs 24 build for this testing). But you are right. I must have somehow checked for that in a different Emacs version. Anyway, that solves my problem wrt testing the type. > > 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. >=20 > Confusing, indeed. Not confusing, actually. It's quite clear. And wrong, unfortunately. So AFAICT this should remain open for now, as a doc bug. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 08 14:02:04 2013 Received: (at 15296-done) by debbugs.gnu.org; 8 Sep 2013 18:02:04 +0000 Received: from localhost ([127.0.0.1]:49206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VIjJD-0005CW-6n for submit@debbugs.gnu.org; Sun, 08 Sep 2013 14:02:03 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:13737) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VIjJB-0005Bt-7v for 15296-done@debbugs.gnu.org; Sun, 08 Sep 2013 14:02:01 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFG4rxBo/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJMEtkQoDpHqBXoMT X-IPAS-Result: Av8EABK/CFG4rxBo/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJMEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="26844602" Received: from 184-175-16-104.dsl.teksavvy.com (HELO pastel.home) ([184.175.16.104]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 08 Sep 2013 13:58:39 -0400 Received: by pastel.home (Postfix, from userid 20848) id 06BFC6306C; Sun, 8 Sep 2013 14:01:54 -0400 (EDT) From: Stefan Monnier To: Drew Adams Subject: Re: bug#15296: 24.3.50; A macro object does not necessarily have `lambda' as its cadr Message-ID: References: <8d69314c-7324-4751-b7c2-ee1a26645afb@default> Date: Sun, 08 Sep 2013 14:01:53 -0400 In-Reply-To: <8d69314c-7324-4751-b7c2-ee1a26645afb@default> (Drew Adams's message of "Fri, 6 Sep 2013 22:39:58 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15296-done Cc: 15296-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > `macro' and whose `cdr' is a lambda expression. That's not true if the I changed it to say "function" instead. Stefan From unknown Fri Sep 05 20:37:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 07 Oct 2013 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator