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

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

bug#27674: 26.0.50; cl-progv: strange scoping due to implementation


From: Roland Winkler
Subject: bug#27674: 26.0.50; cl-progv: strange scoping due to implementation
Date: Sat, 15 Jul 2017 15:46:32 -0500

For the records:

Essentially, Michael's examples expand to

(let ((x 0))
  (let ((fun (lambda () x)))
    (eval `(let ((x 1))
             (funcall ',fun)))))

(let ((fun (lambda () x)))
  (eval `(let ((x 1))
           (funcall ',fun))))

With dynamic binding, both examples return 1.  With lexical binding,
the compiler complains about

  reference to free variable `x'

in the 1st line of the 2nd example.  Then, the 1st example returns 0,
the 2nd example returns 1.





reply via email to

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