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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70524: [PATCH] Fix `map-elt` with `setf` for subplaces


From: Augusto Stoffel
Subject: bug#70524: [PATCH] Fix `map-elt` with `setf` for subplaces
Date: Thu, 25 Apr 2024 14:49:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

On Thu, 25 Apr 2024 at 01:59, okamsn@protonmail.com wrote:

> I would have assumed that `aref` would work with subplaces. I am still 
> thinking of `setf` like a more flexible version of Python allowing 
> things like `my_list[0][0] = 27`.

The right way to achieve this IMO would be the one indicated in
bug#62068:

  (setq my-list (map-insert-in my-list '(0 0) 27))

(I believe I even had an implementation for it, but never submitted the
patch.)

If there's a reasonable way to make a bunch of nested setf's expand to
this, I don't know.  I guess it should be possible, but I'm also not
sure it would be really convenient.





reply via email to

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