[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 04:15:05 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
npostavs@users.sourceforge.net writes:
> > Why does the lambda still refer to the lexical binding?
>
> Maybe it would be more obvious if we wrote it like this:
>
> (let ((x 0))
> (cl-progv (list (intern (read-string "Enter var: "))) (list 1)
> (funcall (lambda () x))))
>
> Clearly the inner x must refer to the lexical let-binding, right? Even
> if the user happens to enter `x' at the prompt this remains true.
Not an argument per se, because with lexical binding mode off, you can
surely do that.
> > Does a lexical binding always beat a dynamical one?
>
> Yes, lexical analysis is performed first and then the names are thrown
> away, so you can't even tell when the "same" variable has been
> dynamically bound as well.
Ok, this is the part I was clearly missing, thanks. I'll have a look if
the documentation tells something like this (it should be spelled out
somewhere).
Then I guess you can close this report.
Thank you,
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, 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,
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, 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
- bug#27674: 26.0.50; cl-progv: strange scoping due to implementation, Stefan Monnier, 2017/07/19