[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [SOLVED with `eval']: Why I cannot use this variable in macro call f
From: |
tomas |
Subject: |
Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function? |
Date: |
Wed, 9 Jun 2021 08:51:29 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Jun 09, 2021 at 09:42:00AM +0300, Jean Louis wrote:
> * tomas@tuxteam.de <tomas@tuxteam.de> [2021-06-09 09:11]:
> > You'll see "43" in your minibuffer. We managed to set the dynamically
> > "defined" variable "that-other-var" to 43. Yay! Now enter
> >
> > that-other-var
> >
> > ...and again C-x e. Minibuffer says... 43. The variable escaped the
> > scope. Bad variable, but hey, that's how setq goes, no?
>
> Yes. I did it.
>
> > * Experiment 2
> >
> > Make new lisp interaction buffer, as above. Make sure you have
> > lexical binding (when experimenting, always change at most one
> > thing at a time, right?). Now:
> >
> > (let ((some-var 42)
> > (that-other-var 44)) ; bind that-other-var locally
> > (eval '(setq that-other-var 43))
> > (message "%S\n" that-other-var))
> >
> > Again, minibuffer says 43. Now...
> >
> > that-other-var
> >
> > ...and C-x e. What does minibuffer say? Is that right or wrong?
> > Explain.
>
> The one bound locally got 44, it was protected from a global
> variable. That is so far expected. If I wish for example avoid case
> sensitive entries, I do:
Was "that-other-var" defined outside the `let'? If yes, what value
did it have? If not, why not?
[skipping the rest. I don't want even to think wrapping my head
around all that before basic things are not cleared. You'll have
to find yourself another sparring partner for this one, sorry]
Cheers
- t
signature.asc
Description: Digital signature
- Oops function?, (continued)
- Oops function?, tomas, 2021/06/08
- [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, Jean Louis, 2021/06/08
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, tomas, 2021/06/08
- Sorry again, tomas, 2021/06/08
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, Jean Louis, 2021/06/08
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, tomas, 2021/06/08
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, Jean Louis, 2021/06/08
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, Jean Louis, 2021/06/08
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, tomas, 2021/06/09
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, Jean Louis, 2021/06/09
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?,
tomas <=
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, Jean Louis, 2021/06/09
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, tomas, 2021/06/09
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, Jean Louis, 2021/06/09
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, tomas, 2021/06/09
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, Jean Louis, 2021/06/09
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, tomas, 2021/06/09
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, Jean Louis, 2021/06/09
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, tomas, 2021/06/09
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, Robert Thorpe, 2021/06/09
- Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?, Jean Louis, 2021/06/10