unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Sean Whitton <spwhitton@spwhitton.name>
To: Lars Ingebrigtsen <larsi@gnus.org>, emacs-devel@gnu.org
Cc: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: master 2e9111813b: Add two classic Common Lisp macro-writing macros
Date: Tue, 12 Apr 2022 08:52:39 -0700	[thread overview]
Message-ID: <8735iiqoxk.fsf@athena.silentflame.com> (raw)
In-Reply-To: <87mtgqg03x.fsf@gnus.org>

[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]

Hello,

On Tue 12 Apr 2022 at 10:46am +02, Lars Ingebrigtsen wrote:

> Sean Whitton <spwhitton@spwhitton.name> writes:
>
>>     Add two classic Common Lisp macro-writing macros
>>
>>     * lisp/emacs-lisp/cl-macs.el (cl-with-gensyms, cl-once-only): New macros.
>
> Emacs now gives a lot of the following warnings when compiling -- I
> haven't checked that it's due to the commit above, but I guess it's
> either that or 6a480c830b.
>
> Warning: Eager macro-expansion skipped due to cycle:
>   … => (load "cl-macs.el") => (macroexpand-all …) => (macroexpand (cl-psetq …)) => (load "cl-macs.el")
> Warning: Eager macro-expansion skipped due to cycle:
>   … => (load "cl-macs.el") => (macroexpand-all …) => (macroexpand (cl-psetq …)) => (load "cl-macs.el")
>   ELC      calendar/diary-lib.elc
>   ELC      calendar/holidays.elc
> Warning: Eager macro-expansion skipped due to cycle:

Here is the fix.  I'll be at a machine where I can install it later
today, or someone else can sooner.  Apologies again!

-- 
Sean Whitton

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-eager-macroexpansion-cycle-in-cl-once-only.patch --]
[-- Type: text/x-diff, Size: 1416 bytes --]

From f467478832a9041017653a07619acfdb9406ad99 Mon Sep 17 00:00:00 2001
From: Sean Whitton <spwhitton@spwhitton.name>
Date: Tue, 12 Apr 2022 08:48:18 -0700
Subject: [PATCH] Fix eager macroexpansion cycle in cl-once-only

* lisp/emacs-lisp/cl-macs.el (cl-once-only): Use different cl-loop
syntax, with no functional change, but such that the loop does not
expand into cl-psetq.
---
 lisp/emacs-lisp/cl-macs.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index af8855516c..364b5120a0 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2473,11 +2473,11 @@ cl-once-only
        ;; We require this explicit call to `list' rather than using
        ;; (,,@(cl-loop ...)) due to a limitation of Elisp's backquote.
        `(let ,(list
-               ,@(cl-loop for name in names and gensym in our-gensyms
+               ,@(cl-loop for name in names for gensym in our-gensyms
                           for to-eval = (or (cadr name) (car name))
                           collect ``(,,gensym ,,to-eval)))
           ;; During macroexpansion, bind each NAME to its gensym.
-          ,(let ,(cl-loop for name in names and gensym in our-gensyms
+          ,(let ,(cl-loop for name in names for gensym in our-gensyms
                           collect `(,(car name) ,gensym))
              ,@body)))))
 
-- 
2.30.2


  reply	other threads:[~2022-04-12 15:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <164974332528.14217.12591424007013368601@vcs2.savannah.gnu.org>
     [not found] ` <20220412060205.8B446C01687@vcs2.savannah.gnu.org>
2022-04-12  6:15   ` master 2e9111813b: Add two classic Common Lisp macro-writing macros Sean Whitton
2022-04-12  7:14     ` Stefan Monnier
2022-04-12 15:57       ` Sean Whitton
2022-04-12 16:22         ` Stefan Monnier
2022-04-12  6:42   ` Po Lu
2022-04-12 18:43     ` Sean Whitton
2022-04-12 19:25       ` Eli Zaretskii
2022-04-13  5:48         ` Sean Whitton
2022-04-13 12:35           ` Eli Zaretskii
2022-04-13 19:46           ` Johann Klähn
2022-04-13 23:16             ` Sean Whitton
2022-04-13  3:58     ` Richard Stallman
2022-04-13  5:08       ` Sean Whitton
2022-04-14  2:56         ` Richard Stallman
2022-04-14  5:14           ` Sean Whitton
2022-04-14 12:06             ` [External] : " Drew Adams
2022-04-15  3:59             ` Richard Stallman
2022-04-15  6:14               ` Eli Zaretskii
2022-04-17  4:09                 ` Richard Stallman
2022-04-17  1:57               ` Michael Heerdegen
2022-04-18  2:41                 ` Richard Stallman
2022-04-18  5:18                   ` Eli Zaretskii
2022-04-19  3:49                     ` Richard Stallman
2022-04-12  8:46   ` Lars Ingebrigtsen
2022-04-12 15:52     ` Sean Whitton [this message]
2022-04-12 15:59       ` Lars Ingebrigtsen
2022-04-13  9:21   ` Philip Kaludercic
2022-04-13 15:14     ` Stefan Monnier

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=8735iiqoxk.fsf@athena.silentflame.com \
    --to=spwhitton@spwhitton.name \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --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).