|
From: | GNU bug Tracking System |
Subject: | bug#65833: closed (30.0.50; cl-loop on the intervals uses global var) |
Date: | Sat, 09 Sep 2023 02:19:01 +0000 |
Your message dated Fri, 08 Sep 2023 22:18:29 -0400 with message-id <jwvmsxw9jjc.fsf-monnier+emacs@gnu.org> and subject line Re: bug#65833: 30.0.50; cl-loop on the intervals uses global var has caused the debbugs.gnu.org bug report #65833, regarding 30.0.50; cl-loop on the intervals uses global var to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs@gnu.org.) -- 65833: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65833 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems
--- Begin Message ---Subject: 30.0.50; cl-loop on the intervals uses global var Date: Fri, 08 Sep 2023 16:57:18 -0400 Package: Emacs Version: 30.0.50 ELISP> (macroexpand '(cl-loop for X being the intervals of B do (FOO))) (cl--block-wrapper (catch '--cl-block-nil-- (cl-block --cl-finish-- (cl--map-intervals (lambda (--cl-var1-- --cl-var2--) (setq X (cons --cl-var1-- --cl-var2--)) (FOO)) B nil nil nil)) nil)) As you can see, this sets fails to declare `X` as being a local variable, so it will affect `X` from the surrounding context. This looping form doesn't exist in Common Lisp, but `for X being` never behaves like that, so this is clearly a bug. Stefan
--- End Message ---
--- Begin Message ---Subject: Re: bug#65833: 30.0.50; cl-loop on the intervals uses global var Date: Fri, 08 Sep 2023 22:18:29 -0400 User-agent: Gnus/5.13 (Gnus v5.13) I pushed a fix for it to `master`. Stefan
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |