[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: |
Michael Heerdegen |
Subject: |
bug#27674: 26.0.50; cl-progv: strange scoping due to implementation |
Date: |
Thu, 13 Jul 2017 02:36:51 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
npostavs@users.sourceforge.net writes:
> Michael Heerdegen <michael_heerdegen@web.de> writes:
>
> > The way `cl-progv' is implemented, we have some strange effects
> > happening to closures in the body. For example, with lexical-binding
> > on,
> >
> > (let ((x 0))
> > (cl-progv (list 'x) (list 1)
> > (funcall (lambda () x))))
> >
> > yields 0, and
> >
> > (cl-progv (list 'x) (list 1)
> > (funcall (lambda () x)))
> >
> > yields 1. That isn't consistent (FWIW I would expect `1' in both
> > cases).
>
> IMO, this is a bug in your program
Why?
>, this yields 1:
>
> (progn
> (defvar x)
> (let ((x 0))
> (cl-progv (list 'x) (list 1)
> (funcall (lambda () x)))))
Sure, but that's something different. I didn't want a special variable
in my example. The doc of `cl-progv' doesn't mention that the symbols
must correspond to special variables. Do I miss something?
Michael.
- bug#27674: 26.0.50; cl-progv: strange scoping due to implementation, Michael Heerdegen, 2017/07/12
- bug#27674: 26.0.50; cl-progv: strange scoping due to implementation, npostavs, 2017/07/12
- bug#27674: 26.0.50; cl-progv: strange scoping due to implementation,
Michael Heerdegen <=
- bug#27674: 26.0.50; cl-progv: strange scoping due to implementation, npostavs, 2017/07/12
- bug#27674: 26.0.50; cl-progv: strange scoping due to implementation, Michael Heerdegen, 2017/07/12
- bug#27674: 26.0.50; cl-progv: strange scoping due to implementation, npostavs, 2017/07/12
- bug#27674: 26.0.50; cl-progv: strange scoping due to implementation, Michael Heerdegen, 2017/07/12
- bug#27674: 26.0.50; cl-progv: strange scoping due to implementation, npostavs, 2017/07/12
- bug#27674: 26.0.50; cl-progv: strange scoping due to implementation, Roland Winkler, 2017/07/13
- bug#27674: 26.0.50; cl-progv: strange scoping due to implementation, Noam Postavsky, 2017/07/13
- bug#27674: 26.0.50; cl-progv: strange scoping due to implementation, Michael Heerdegen, 2017/07/14
- bug#27674: 26.0.50; cl-progv: strange scoping due to implementation, Roland Winkler, 2017/07/15
- bug#27674: 26.0.50; cl-progv: strange scoping due to implementation, Michael Heerdegen, 2017/07/14