bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61743: cl-loop's "being the intervals of" does not let-bind var


From: JD Smith
Subject: bug#61743: cl-loop's "being the intervals of" does not let-bind var
Date: Thu, 23 Feb 2023 17:44:51 -0500

Macro-expanding the following reveals that the “being the intervals” cl-loop 
construct fails to let-bind the loop var (i here):

  (cl-loop for i being the intervals of x do (ignore))

expanding to:

(cl-block nil
  (cl-block --cl-finish--
    (cl--map-intervals
     (lambda
       (--cl-var1-- --cl-var2--)
       (setq i
             (cons --cl-var1-- --cl-var2--))
       (ignore))
     x nil nil nil))
  nil)

This leads to the loop altering global variables.  Emacs v28.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]