From: Tino Calancha <tino.calancha@gmail.com>
To: 39428@debbugs.gnu.org
Cc: stefan monnier <monnier@iro.umontreal.ca>, dick.r.chiang@gmail.com
Subject: bug#39428: 28.0.50; cl--push-clause-loop-body: eval macro arg just once
Date: Tue, 04 Feb 2020 22:05:30 +0100 [thread overview]
Message-ID: <87mu9yhxlx.fsf@calancha-pc.dy.bbexcite.jp> (raw)
X-Debbugs-Cc: Stefan Monnier <monnier@iro.umontreal.ca>,dick.r.chiang@gmail.com
I think this little tweak has sense. WDYT?
--8<-----------------------------cut here---------------start------------->8---
commit eb88afb89a8cfb760d89569e74c8ece1d1c446cb
Author: Tino Calancha <tino.calancha@gmail.com>
Date: Tue Feb 4 21:52:06 2020 +0100
Eval macro arg just once
* lisp/emacs-lisp/cl-macs.el (cl--push-clause-loop-body):
Use `macroexp-let2'.
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 9d0fd15bc3..4c2f58907d 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -1037,9 +1037,10 @@ cl-loop
(defmacro cl--push-clause-loop-body (clause)
"Apply CLAUSE to both `cl--loop-conditions' and `cl--loop-body'."
- `(progn
- (push ,clause cl--loop-conditions)
- (push ,clause cl--loop-body)))
+ (macroexp-let2 nil sym clause
+ `(progn
+ (push ,sym cl--loop-conditions)
+ (push ,sym cl--loop-body))))
;; Below is a complete spec for cl-loop, in several parts that correspond
;; to the syntax given in CLtL2. The specs do more than specify where
--8<-----------------------------cut here---------------end--------------->8---
In GNU Emacs 28.0.50 (build 21, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0)
of 2020-02-04 built on calancha-pc.dy.bbexcite.jp
Repository revision: e287da5a8154d83a97107b64915ccc17e3a086b8
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)
next reply other threads:[~2020-02-04 21:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-04 21:05 Tino Calancha [this message]
2020-02-04 21:15 ` bug#39428: 28.0.50; cl--push-clause-loop-body: eval macro arg just once dick.r.chiang
2020-02-05 18:08 ` Tino Calancha
2020-02-05 0:26 ` Stefan Monnier
2020-02-05 18:03 ` Tino Calancha
2020-02-05 18:08 ` Tino Calancha
2020-02-05 18:35 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mu9yhxlx.fsf@calancha-pc.dy.bbexcite.jp \
--to=tino.calancha@gmail.com \
--cc=39428@debbugs.gnu.org \
--cc=dick.r.chiang@gmail.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).