From unknown Sun Jun 22 07:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19371: 25.0.50; doc of functions and macros defined in macroexp.el Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Dec 2014 19:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19371 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 19371@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14184975077812 (code B ref -1); Sat, 13 Dec 2014 19:06:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Dec 2014 19:05:07 +0000 Received: from localhost ([127.0.0.1]:45016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xzs02-00021v-Ou for submit@debbugs.gnu.org; Sat, 13 Dec 2014 14:05:07 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53843) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xzs00-00021N-9D for submit@debbugs.gnu.org; Sat, 13 Dec 2014 14:05:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xzrzk-0004Jl-LH for submit@debbugs.gnu.org; Sat, 13 Dec 2014 14:04:58 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xzrzk-0004JV-I6 for submit@debbugs.gnu.org; Sat, 13 Dec 2014 14:04:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xzrzb-0004Gj-PG for bug-gnu-emacs@gnu.org; Sat, 13 Dec 2014 14:04:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzrzT-0004EV-10 for bug-gnu-emacs@gnu.org; Sat, 13 Dec 2014 14:04:39 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:24056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzrzS-0004EQ-QJ for bug-gnu-emacs@gnu.org; Sat, 13 Dec 2014 14:04:30 -0500 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sBDJ4QJG027730 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 13 Dec 2014 19:04:27 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sBDJ4PVF006249 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 13 Dec 2014 19:04:26 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id sBDJ4O0C006222 for ; Sat, 13 Dec 2014 19:04:24 GMT MIME-Version: 1.0 Message-ID: <1b8c129f-19cb-4088-ad8a-4eb0f9df6a54@default> Date: Sat, 13 Dec 2014 11:04:24 -0800 (PST) From: Drew Adams X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] 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: -4.0 (----) 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.0 (----) 1. `macroexp-let2' is used plenty in the Lisp sources now. And its documentation is in complete/rudimentary. Please fix this. 1a. It is not even mentioned in the Elisp manual. Please document it=20 properly there. 1b. The doc string says: "Bind VAR to a copyable expression that returns the value of EXP. This is like `(let ((v ,EXP)) ,EXPS) except that `v' is a new generated symbol which EXPS can find in VAR." What on Earth does it mean for EXPS to find the symbol `v' in VAR? VAR is a symbol. What does it mean for a list of expressions to find another symbol "in" symbol VAR? Just what does it mean for the expression to which VAR is bound to be "copyable" or not "copyable"? If you mean `macroexp-copyable-p' then say so. I'm only presuming that EXPS is a list of Lisp sexps. It is not even described, but it needs to be. Nor is EXP described, for that matter. I'm guessing that it is a Lisp sexp, but it too needs to be specified properly. What does it mean for "the `let'" to be skipped"? How is TEST really used - what is it for? So far, this macro description is gobbledygook. Please document the macro properly. 2. And then there is `macroexp-let2*', whose doc string says only to bind each binding (bind a binding?!) "as `macrolet2' does". That means nothing. Presumably, based on the `*' in the name, the behavior is similar to that of `let*'. If so, you can use the doc of `let* as inspiration. 3. The doc strings of `macroexp-let*', `macroexp-progn', and others say that the function returns "an expression equivalent to" some expression. They should say what they mean by equivalence, here. If you mean that they use `macroexp-quote' to create the "equivalent" expression then say so. The doc string of `macroexp-let*' needs to use BINDINGS and EXP, not the same in lowercase, in the equivalent expression. Similarly, the doc string of `macroexp-if' needs to use uppercase TEST, THEN, and ELSE. 4. The doc string of `macroexp--accumulate' refers to parameters that do not exist: VAR and LIST. It should say explicitly (and not just via `(fn ...)') that the first parameter is a list of the form `(VAR LIST)'. (And no, it does not matter that this macro is internal.) 5. The doc string of `macroexp--cons' is incomprehensible. In GNU Emacs 25.0.50.1 (i686-pc-mingw32) of 2014-11-30 on LEG570 Bzr revision: 3517da701ea5d16c296745d6678988b06bee615d Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --without-dbus --enable-checking=3Dyes,glyphs CPPFLAGS=3D-DGLYPH_DEBUG=3D1' From unknown Sun Jun 22 07:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19371: 25.0.50; doc of functions and macros defined in macroexp.el Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Aug 2019 21:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19371 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 19371@debbugs.gnu.org Received: via spool by 19371-submit@debbugs.gnu.org id=B19371.156478025016420 (code B ref 19371); Fri, 02 Aug 2019 21:11:02 +0000 Received: (at 19371) by debbugs.gnu.org; 2 Aug 2019 21:10:50 +0000 Received: from localhost ([127.0.0.1]:57920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htep8-0004Gm-IQ for submit@debbugs.gnu.org; Fri, 02 Aug 2019 17:10:50 -0400 Received: from quimby.gnus.org ([80.91.231.51]:36182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htep6-0004Gc-Mn for 19371@debbugs.gnu.org; Fri, 02 Aug 2019 17:10:49 -0400 Received: from 77.18.62.220.tmi.telenormobil.no ([77.18.62.220] helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1htep2-00067v-8M; Fri, 02 Aug 2019 23:10:46 +0200 From: Lars Ingebrigtsen References: <1b8c129f-19cb-4088-ad8a-4eb0f9df6a54@default> Date: Fri, 02 Aug 2019 23:10:43 +0200 In-Reply-To: <1b8c129f-19cb-4088-ad8a-4eb0f9df6a54@default> (Drew Adams's message of "Sat, 13 Dec 2014 11:04:24 -0800 (PST)") Message-ID: <87v9vfl1d8.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Drew Adams writes: > 1. `macroexp-let2' is used plenty in the Lisp sources now. And its > documentation is in complete/rudimentary. Please fix this. Looks like Paul added extensive documentation to this macro i 2015. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 TVD_RCVD_IP Message was received from an IP address -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Drew Adams writes: > 1. `macroexp-let2' is used plenty in the Lisp sources now. And its > documentation is in complete/rudimentary. Please fix this. Looks like Paul added extensive documentation to this macro i 2015. > 2. And then there is `macroexp-let2*', whose doc string says only to > bind each binding (bind a binding?!) "as `macrolet2' does". That > means nothing. Presumably, based on the `*' in the name, the behavior > is similar to that of `let*'. If so, you can use the doc of `let* > as inspiration. Uhm... I have no idea what it does: (defmacro macroexp-let2* (test bindings &rest body) "Bind each binding in BINDINGS as `macroexp-let2' does." (declare (indent 2) (debug (sexp (&rest (sexp form)) body))) (pcase-exhaustive bindings ('nil (macroexp-progn body)) (`((,var ,exp) . ,tl) `(macroexp-let2 ,test ,var ,exp (macroexp-let2* ,test ,tl ,@body))))) Perhaps somebody could use their decoder ring. > 3. The doc strings of `macroexp-let*', `macroexp-progn', and others > say that the function returns "an expression equivalent to" some > expression. They should say what they mean by equivalence, here. > If you mean that they use `macroexp-quote' to create the > "equivalent" expression then say so. No, the meaning here seems to be that they are semantically equivalent. I changed the doc string of macroexp-progn to "Return EXPS with `progn' prepended. If EXPS is a single expression, `progn' is not prepended." but I think the rest are OK. > The doc string of `macroexp-let*' needs to use BINDINGS and EXP, not > the same in lowercase, in the equivalent expression. I've now fixed this. > Similarly, the doc string of `macroexp-if' needs to use uppercase > TEST, THEN, and ELSE. Somebody else has fixed that in the intervening years. > 4. The doc string of `macroexp--accumulate' refers to parameters > that do not exist: VAR and LIST. It should say explicitly (and > not just via `(fn ...)') that the first parameter is a list of > the form `(VAR LIST)'. (And no, it does not matter that this > macro is internal.) This has been fixed, too. > 5. The doc string of `macroexp--cons' is incomprehensible. I've now fixed it. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 07:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19371: 25.0.50; doc of functions and macros defined in macroexp.el Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Aug 2019 22:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19371 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 19371@debbugs.gnu.org, Drew Adams Received: via spool by 19371-submit@debbugs.gnu.org id=B19371.156478521724815 (code B ref 19371); Fri, 02 Aug 2019 22:34:02 +0000 Received: (at 19371) by debbugs.gnu.org; 2 Aug 2019 22:33:37 +0000 Received: from localhost ([127.0.0.1]:57956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htg7F-0006SB-1a for submit@debbugs.gnu.org; Fri, 02 Aug 2019 18:33:37 -0400 Received: from mout.web.de ([212.227.17.11]:38177) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htg7C-0006Ry-PR for 19371@debbugs.gnu.org; Fri, 02 Aug 2019 18:33:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1564785197; bh=Ri1mhbfkwcOxELIRYJECYbHi3N2A/UT9iUURQ0OIRak=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=aLlSv+/tNeiLLJSlyLuKcVBSuIBYLbswBTu1/9O+Ee49Nbs4aMGpwb4UCMIOM0DYx mI1CLWqW7TYnaevobJxIeb3xrip85WpWIaBAVoWHLkf1J/yhRx8yY+34igZNTh/wDn wpkz+grnJ0Ct9tT7HVhcS0Fc6VJDT10LVFKAaenA= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([92.208.178.242]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MVLak-1hqwIV2TPC-00YecJ; Sat, 03 Aug 2019 00:33:17 +0200 From: Michael Heerdegen References: <1b8c129f-19cb-4088-ad8a-4eb0f9df6a54@default> <87v9vfl1d8.fsf@mouse.gnus.org> Date: Sat, 03 Aug 2019 00:33:14 +0200 In-Reply-To: <87v9vfl1d8.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Fri, 02 Aug 2019 23:10:43 +0200") Message-ID: <87blx7jiz9.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:oHPnAyU5UrzazpKfcx+2+VQG8HbhkFAjVgtdKpAUTB34x3nnabG XJGOiO7GEnUSebyRDRSAF9YUwfn/X9GHrs9edEO0lp9FuxzNK7NxUN0MsKS8gyO7GPSmesD QXdxciGZFAsPnUXyXMSG6gM1J6nxmnCAMVD+P71zWqwhdW7/9ZQmAs/XCmmefsWw6a91ayo atVCUwuIY7z7S1/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aEcwvR0JX3cqJIlZLNfM7x TEa0q+lQJYWrNrE4Xor6o7RPJvlp0/fK5G+Tkf/8Xiv140QdgEJWeevhw3XKfGhN7tBfE8+Dk wyXSKcB3Y14Ivx8Q/45ZZOhyD+gvupAIEiNo0Xf02gE6AS7I0Ktfwgz9FrhkU87zrM3Xbuzh9 gdSMk= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Lars Ingebrigtsen writes: > (defun macroexp-progn (exps) > - "Return an expression equivalent to \\=`(progn ,@EXPS)." > + "Return EXPS with `progn' prepended. > +If EXPS is a single expression, `progn' is not prepended." > (if (cdr exps) `(progn ,@exps) (car exps))) That's described a bit confusingly: AFAIU EXPS should always be a list of expressions, and when it's _a_list_ of only one expression, `progn' is not prepended and the expression is returned (and not EXPS as your text suggests). BTW, compared to that description I find the original version much better (simpler). > > 2. And then there is `macroexp-let2*', whose doc string says only to > > bind each binding (bind a binding?!) "as `macrolet2' does". That > > means nothing. Presumably, based on the `*' in the name, the behavior > > is similar to that of `let*'. If so, you can use the doc of `let* > > as inspiration. > > Uhm... I have no idea what it does: > > (defmacro macroexp-let2* (test bindings &rest body) > "Bind each binding in BINDINGS as `macroexp-let2' does." > (declare (indent 2) (debug (sexp (&rest (sexp form)) body))) > (pcase-exhaustive bindings > ('nil (macroexp-progn body)) > (`((,var ,exp) . ,tl) > `(macroexp-let2 ,test ,var ,exp > (macroexp-let2* ,test ,tl ,@body))))) You understand what macroexp-let2 does? It supports one binding (a var plus an expression, specified as separate arguments). macroexp-let2* supports a list of such pairs specified as BINDINGS, similar to let*. The naming scheme `macroexp-let2' vs. `macroexp-let2*' is not ideal: first, because `macroexp-let2' doesn't support multiple bindings like `let', and secondly because, if I look at the use cases in the sources, most of them just want to establish multiple bindings, but parallel binding would suffice, so they actually want to non-stared version of macroexp-let2*, which is not macroexp-let2 - AFAICT it doesn't exist. Michael. From unknown Sun Jun 22 07:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19371: 25.0.50; doc of functions and macros defined in macroexp.el Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Aug 2019 11:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19371 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Heerdegen Cc: 19371@debbugs.gnu.org, Drew Adams Received: via spool by 19371-submit@debbugs.gnu.org id=B19371.15648330386891 (code B ref 19371); Sat, 03 Aug 2019 11:51:01 +0000 Received: (at 19371) by debbugs.gnu.org; 3 Aug 2019 11:50:38 +0000 Received: from localhost ([127.0.0.1]:58389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htsYY-0001n5-FM for submit@debbugs.gnu.org; Sat, 03 Aug 2019 07:50:38 -0400 Received: from quimby.gnus.org ([80.91.231.51]:46028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htsYW-0001mw-AR for 19371@debbugs.gnu.org; Sat, 03 Aug 2019 07:50:36 -0400 Received: from 77.18.62.220.tmi.telenormobil.no ([77.18.62.220] helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1htsYO-0003zX-Tv; Sat, 03 Aug 2019 13:50:32 +0200 From: Lars Ingebrigtsen References: <1b8c129f-19cb-4088-ad8a-4eb0f9df6a54@default> <87v9vfl1d8.fsf@mouse.gnus.org> <87blx7jiz9.fsf@web.de> Date: Sat, 03 Aug 2019 13:50:27 +0200 In-Reply-To: <87blx7jiz9.fsf@web.de> (Michael Heerdegen's message of "Sat, 03 Aug 2019 00:33:14 +0200") Message-ID: <871ry2lb7g.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Michael Heerdegen writes: > Lars Ingebrigtsen writes: > >> (defun macroexp-progn (exps) >> - "Return an expression equivalent to \\=`(progn ,@EXPS)." >> + "Return EXPS with `progn' prepended. >> +If EXPS is a [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 TVD_RCVD_IP Message was received from an IP address -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Michael Heerdegen writes: > Lars Ingebrigtsen writes: > >> (defun macroexp-progn (exps) >> - "Return an expression equivalent to \\=`(progn ,@EXPS)." >> + "Return EXPS with `progn' prepended. >> +If EXPS is a single expression, `progn' is not prepended." >> (if (cdr exps) `(progn ,@exps) (car exps))) > > That's described a bit confusingly: AFAIU EXPS should always be a list > of expressions, and when it's _a_list_ of only one expression, `progn' > is not prepended and the expression is returned (and not EXPS as your > text suggests). BTW, compared to that description I find the original > version much better (simpler). Yeah, the doc string is now misleading. I've rewritten it now as: --- Return EXPS (a list of expressions) with `progn' prepended. If EXPS is a list with a single expression, `progn' is not prepended, but that expression is returned instead. --- >> Uhm... I have no idea what it does: >> >> (defmacro macroexp-let2* (test bindings &rest body) >> "Bind each binding in BINDINGS as `macroexp-let2' does." >> (declare (indent 2) (debug (sexp (&rest (sexp form)) body))) >> (pcase-exhaustive bindings >> ('nil (macroexp-progn body)) >> (`((,var ,exp) . ,tl) >> `(macroexp-let2 ,test ,var ,exp >> (macroexp-let2* ,test ,tl ,@body))))) > > You understand what macroexp-let2 does? No, not really. > It supports one binding (a var plus an expression, specified as > separate arguments). macroexp-let2* supports a list of such pairs > specified as BINDINGS, similar to let*. > > The naming scheme `macroexp-let2' vs. `macroexp-let2*' is not ideal: > first, because `macroexp-let2' doesn't support multiple bindings like > `let', and secondly because, if I look at the use cases in the sources, > most of them just want to establish multiple bindings, but parallel > binding would suffice, so they actually want to non-stared version of > macroexp-let2*, which is not macroexp-let2 - AFAICT it doesn't exist. Yes, it's confusing. But perhaps you could propose a doc string for `macroexp-let2*'? :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 07:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19371: 25.0.50; doc of functions and macros defined in macroexp.el Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Aug 2019 12:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19371 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 19371@debbugs.gnu.org, Drew Adams Received: via spool by 19371-submit@debbugs.gnu.org id=B19371.156492178520323 (code B ref 19371); Sun, 04 Aug 2019 12:30:02 +0000 Received: (at 19371) by debbugs.gnu.org; 4 Aug 2019 12:29:45 +0000 Received: from localhost ([127.0.0.1]:60746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huFdx-0005Hh-5m for submit@debbugs.gnu.org; Sun, 04 Aug 2019 08:29:45 -0400 Received: from mout.web.de ([212.227.15.3]:53199) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huFdv-0005HV-38 for 19371@debbugs.gnu.org; Sun, 04 Aug 2019 08:29:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1564921769; bh=Wzgc6gWAuP3HoaRvYGcEdoaA1IW81APfq8OwGctairw=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=N25pjqGxY9Ud9nI790gFt1tGFiDXeHLYCYqR782uH4dGturHp9AnHm7aKgnXF+R+r x+lddyp21rQW69RKwbqFCpOMjkkpHL9PM4fDqpk6svcA89kuLBwhFjgtSDEWwbSepR vJ3/rwFgQS4QhgK9l6tljLzNhokeQdoVQEaGbx+o= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([92.208.178.242]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LxO2c-1iQX8F1JiE-016yLb; Sun, 04 Aug 2019 14:29:29 +0200 From: Michael Heerdegen References: <1b8c129f-19cb-4088-ad8a-4eb0f9df6a54@default> <87v9vfl1d8.fsf@mouse.gnus.org> <87blx7jiz9.fsf@web.de> <871ry2lb7g.fsf@mouse.gnus.org> Date: Sun, 04 Aug 2019 14:29:27 +0200 In-Reply-To: <871ry2lb7g.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Sat, 03 Aug 2019 13:50:27 +0200") Message-ID: <87imrd3yhk.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:9g+CvDzfanANYmuhLim0hRZfE44a+hbyYI/+8O5sjuQlkQ6+Bca IvGKt0iRETeLWDM5lk5est1rWph8CSg9QGQ28CfbWKAkO9Fy6u/4DaYzOkjcZ4Sq5BjMaBU hpY4iAvpl2Q6unN6IhcOeG3YBkV6V1ebmjq3LYbtnwRgnpwtoyUqsfOL+K39ONmRQXS+2jS Ps1TR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/rfpYaR8s7PEfD1MN8+F/JDXnnM63Ub0No4DMJnbvSqxRIbsm otr7pCyLCOHPstIWDFszEuWa0oLYKV9MgoOg1bjDnIHaQw1J0HVmj0cyFy1n2TkWHrdo/jF+J hzu+R++4f/nxii10rHx9EMg/ANBsM0m3pPqL/j9drcahiDK7A2xTMjQ2h04eXAt+h2s2bRFy5 9HKxo= X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Lars Ingebrigtsen writes: > Yes, it's confusing. But perhaps you could propose a doc string for > `macroexp-let2*'? :-) Hmm, it's really just a variant of m-let2 supporting any number of bindings instead of exactly one. So, something like Multiple binding version of `macroexp-let2'. BINDINGS is a list of elements of the form (SYM EXP). Each EXP can refer to symbols specified earlier in the binding list. maybe? I'm not good in writing docstrings. Michael. From unknown Sun Jun 22 07:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19371: 25.0.50; doc of functions and macros defined in macroexp.el Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Aug 2019 13:15:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19371 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Heerdegen Cc: Drew Adams , 19371@debbugs.gnu.org Received: via spool by 19371-submit@debbugs.gnu.org id=B19371.15649244741225 (code B ref 19371); Sun, 04 Aug 2019 13:15:04 +0000 Received: (at 19371) by debbugs.gnu.org; 4 Aug 2019 13:14:34 +0000 Received: from localhost ([127.0.0.1]:60798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huGLK-0000JW-1W for submit@debbugs.gnu.org; Sun, 04 Aug 2019 09:14:34 -0400 Received: from quimby.gnus.org ([80.91.231.51]:37358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huGLG-0000Hz-5W for 19371@debbugs.gnu.org; Sun, 04 Aug 2019 09:14:32 -0400 Received: from 77.18.62.220.tmi.telenormobil.no ([77.18.62.220] helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1huFsE-0007Qz-Rq; Sun, 04 Aug 2019 14:44:33 +0200 From: Lars Ingebrigtsen References: <1b8c129f-19cb-4088-ad8a-4eb0f9df6a54@default> <87v9vfl1d8.fsf@mouse.gnus.org> <87blx7jiz9.fsf@web.de> <871ry2lb7g.fsf@mouse.gnus.org> <87imrd3yhk.fsf@web.de> Date: Sun, 04 Aug 2019 14:44:30 +0200 In-Reply-To: <87imrd3yhk.fsf@web.de> (Michael Heerdegen's message of "Sun, 04 Aug 2019 14:29:27 +0200") Message-ID: <87k1bt9k29.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Michael Heerdegen writes: > Hmm, it's really just a variant of m-let2 supporting any number of > bindings instead of exactly one. So, something like > > Multiple binding version of `macroexp-let2'. > > BINDINGS is a list of el [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 TVD_RCVD_IP Message was received from an IP address -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Michael Heerdegen writes: > Hmm, it's really just a variant of m-let2 supporting any number of > bindings instead of exactly one. So, something like > > Multiple binding version of `macroexp-let2'. > > BINDINGS is a list of elements of the form (SYM EXP). Each EXP can > refer to symbols specified earlier in the binding list. > > maybe? I'm not good in writing docstrings. Sounds good to me, so I added it to the trunk. And that was the final macro mentioned in this bug report, so I'm now closing it. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 04 09:14:34 2019 Received: (at control) by debbugs.gnu.org; 4 Aug 2019 13:14:34 +0000 Received: from localhost ([127.0.0.1]:60795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huGLJ-0000JQ-Ps for submit@debbugs.gnu.org; Sun, 04 Aug 2019 09:14:33 -0400 Received: from quimby.gnus.org ([80.91.231.51]:37358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huGLF-0000Hz-I4 for control@debbugs.gnu.org; Sun, 04 Aug 2019 09:14:29 -0400 Received: from 77.18.62.220.tmi.telenormobil.no ([77.18.62.220] helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1huFsM-0007R7-AF for control@debbugs.gnu.org; Sun, 04 Aug 2019 14:44:40 +0200 Date: Sun, 04 Aug 2019 14:44:37 +0200 Message-Id: <87imrd9k22.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #19371 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 19371 fixed close 19371 27.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 TVD_RCVD_IP Message was received from an IP address -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) tags 19371 fixed close 19371 27.1 quit