[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using gv in map and seq?
From: |
Stefan Monnier |
Subject: |
Re: Using gv in map and seq? |
Date: |
Thu, 18 Jun 2015 22:52:55 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> You lost me :-)
> Could you explain a bit more?
Quelle partie?
gv-letplace prend une "place" est la transforme en un "getter" et un
"setter". P.ex. si `map' est (nth 5 (foo)), gv-letplace va ajouter un
"(let ((x (nthcdr 5 (foo)))) ...)" et renvoyer la sexp "(car x)" comme
"getter" et la fonction (lambda (v) `(setcar x ,v)) comme "setter".
Ça doit être au tout debut du gv-expander, vu que l'évaluation de
(nthcdr 5 (foo)) doit avoir lieu une seule fois et avant l'évaluation de
`key', `default', etc...
Ensuite, on veut passer cette "place" à `alist-get' (pour éviter de
réinventer son fonctionnement), mais on peut plus utiliser `map' (qui
causerait une deuxième évaluation de (nthcdr 5 (foo)), et donc une
erreur) donc il faut synthétiser une place à partir de "mgetter" et
"msetter", et c'èst à ça que sert le `map--raw-place'.
Stefan
- Re: Using gv in map and seq?, (continued)
- Re: Using gv in map and seq?, Nicolas Petton, 2015/06/15
- Re: Using gv in map and seq?, Stefan Monnier, 2015/06/15
- Re: Using gv in map and seq?, Stefan Monnier, 2015/06/15
- Re: Using gv in map and seq?, Nicolas Petton, 2015/06/16
- Re: Using gv in map and seq?, Nicolas Petton, 2015/06/16
- Re: Using gv in map and seq?, Stefan Monnier, 2015/06/16
- Re: Using gv in map and seq?, Stefan Monnier, 2015/06/17
- Re: Using gv in map and seq?, Nicolas Petton, 2015/06/17
- Re: Using gv in map and seq?, Stefan Monnier, 2015/06/17
- Re: Using gv in map and seq?, Nicolas Petton, 2015/06/18
- Re: Using gv in map and seq?,
Stefan Monnier <=
- Re: Using gv in map and seq?, Nicolas Petton, 2015/06/16
- [OT] Working with patches inlined in emails (was: Using gv in map and seq?), Nicolas Petton, 2015/06/18
- Re: [OT] Working with patches inlined in emails (was: Using gv in map and seq?), Eli Zaretskii, 2015/06/18
- Re: [OT] Working with patches inlined in emails, João Távora, 2015/06/18
- Re: [OT] Working with patches inlined in emails (was: Using gv in map and seq?), Nicolas Petton, 2015/06/18
- Re: [OT] Working with patches inlined in emails (was: Using gv in map and seq?), Nicolas Petton, 2015/06/18
- Re: [OT] Working with patches inlined in emails, Andreas Schwab, 2015/06/18