[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: |
Tue, 16 Jun 2015 20:41:54 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
>>> Something like the patch below seems to work (and it generalizes
>>> map-put to accept for MAP not only symbols but any "lvalue"). It also
>>> tightens the code generated by map--dispatch.
> But you have completely removed `map-put' here, right? Is it supposed to
> be implemented in terms of `map-elt' now that it is "set-able"?
Indeed, it becomes redundant: you can use (setf (map-elt M K) V) à la place.
> > Something like the patch below seems to work (and it generalizes
> > map-put to accept for MAP not only symbols but any "lvalue").
> For lists, yes indeed. I was looking for a simple way to do that,
> thanks!
Since the macro-expansion is done before we know what type we'll get,
the restriction to lvalues carries over to all other types :-(
> Je bloque sur ton code, quand j'évalue
>
> (setq my-map '())
> (setf (map-elt my-map 'b) 4)
>
> J'ai une erreur `Debugger entered--Lisp error: (void-variable map)'
Il y a en tout cas l'erreur ci-dessous qu'il faut corriger:
> > + `(map--dispatch map
^^^
,map
-- Stefan
- 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?, 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 <=
- 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, 2015/06/18
- 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