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

[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 13:33:53 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jun 09, 2021 at 01:56:45PM +0300, Jean Louis wrote:
> * tomas@tuxteam.de <tomas@tuxteam.de> [2021-06-09 11:54]:
> > On Wed, Jun 09, 2021 at 11:22:38AM +0300, Jean Louis wrote:
> > > * tomas@tuxteam.de <tomas@tuxteam.de> [2021-06-09 10:40]:
> > > > You snipped the (for me) interesting part: did you notice how
> > > > `eval' jumps over the local declaration?
> > > 
> > > Do you mean variables within `let'?
> > 
> > Yes, it doesn't see them :)
> 
> Maybe in theory it does not see, but in reality it does see it as
> `list' is evaluated before `eval', so the interned `rcd-symbol' and
> variable `description' they get evaluated before `eval'.

That sentence doesn't make any sense to me. It does or it doesn't.

I propose to you the next experiment:

* experiment 3

  (let ()
    (let ((x 42))
      (eval '(progn (setq x 43) (message "in eval: x is %S" x)))
      (message "inner let: x is %S" x))
    (message "outer let: x is %S" x))

(you might have to switch to the *Messages* buffer to see all three
messages).

What are the results? Do they correspond to your expectations? If
not, why not?

Cheers
 - t

Attachment: signature.asc
Description: Digital signature


reply via email to

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