[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lexical-binding is turned on in more use cases
From: |
Noam Postavsky |
Subject: |
Re: lexical-binding is turned on in more use cases |
Date: |
Tue, 10 Mar 2020 21:36:14 -0400 |
On Tue, 10 Mar 2020 at 19:42, Michael Heerdegen
<address@hidden> wrote:
> (defun my-make-counter ()
> (let ((counter 0))
> (lambda () (setq counter (1+ counter)))))
>
> (setq mc (my-make-counter))
> If you eval (my-make-counter) with lexical-binding off, the result is
> not functional.
Actually, it only fails if you evaluate the (defun my-make-counter
...) with lexical-binding off.
> Were does M-: break for you with the change?
Please, let's not go in circles. An example was already given
upthread: https://lists.gnu.org/r/emacs-devel/2020-03/msg00219.html
Essentially some cc-mode variables are only declared dynamic locally
within individual files. Without lexical binding the only difference
this causes is that they are unbound at top level; but with
lexical-binding, outside of the declaring files (e.g., in M-:
expressions), let-binding those variables doesn't bind the value
dynamically.
- Re: lexical-binding is turned on in more use cases, (continued)
- Re: lexical-binding is turned on in more use cases, Stefan Monnier, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Michael Heerdegen, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Alan Mackenzie, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Stefan Monnier, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Eli Zaretskii, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Michael Heerdegen, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Alan Mackenzie, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Michael Heerdegen, 2020/03/10
- Re: lexical-binding is turned on in more use cases,
Noam Postavsky <=
- Re: lexical-binding is turned on in more use cases, Michael Heerdegen, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Noam Postavsky, 2020/03/12
- Re: lexical-binding is turned on in more use cases, Richard Stallman, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Stefan Monnier, 2020/03/11
- Re: lexical-binding is turned on in more use cases, Michael Heerdegen, 2020/03/12
- Re: lexical-binding is turned on in more use cases, Stefan Monnier, 2020/03/10
- Re: lexical-binding is turned on in more use cases, John Wiegley, 2020/03/11
- Re: lexical-binding is turned on in more use cases, Alan Mackenzie, 2020/03/09
- Re: lexical-binding is turned on in more use cases, Stefan Monnier, 2020/03/09
- Re: lexical-binding is turned on in more use cases, Alan Mackenzie, 2020/03/10