[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: map.el documentation
From: |
Robert Pluim |
Subject: |
Re: map.el documentation |
Date: |
Fri, 24 Jan 2025 16:09:44 +0100 |
>>>>> On Fri, 24 Jan 2025 14:29:35 +0100, Augusto Stoffel <arstoffel@gmail.com>
>>>>> said:
Augusto> On Thu, 23 Jan 2025 at 11:33, Robert Pluim wrote:
>> I must admit, the semantics of `map-insert' feel more natural to me
>> than `map-put!', but I guess both are needed.
Augusto> I've argued in some previous bug that map-put! is misguided and
should
Augusto> be obsoleted.
Augusto> The right concept is a map-insert! function that _may_ act
destructively
Augusto> on the argument. This is the bread and butter of Lisp semantics
and
Augusto> gets rid of the weird `map-not-inplace` error.
We could change `map-insert' to do that.
Augusto> (There are some other funny behaviors in map.el which IMHO should
be
Augusto> fixed while it's still not heavily used.)
Do tell.
Itʼs not heavily used inside Emacs. Itʼs been around since emacs-25,
so who knows what use packages make of it.
If we fix `map-insert', it also fixes this:
ELISP> (map-length (map-insert (map-insert nil 1 2) 1 4))
2
(I know what the docstring says. I want a map that contains only
unique key/val mappings).
Robert
--
- Re: map.el documentation (was: bug#75170: add-to-alist: new function), Eli Zaretskii, 2025/01/23
- Re: map.el documentation, Robert Pluim, 2025/01/23
- Re: map.el documentation, Eli Zaretskii, 2025/01/23
- Re: map.el documentation, Augusto Stoffel, 2025/01/24
- Re: map.el documentation,
Robert Pluim <=
- Re: map.el documentation, Ship Mints, 2025/01/24
- Re: map.el documentation, Augusto Stoffel, 2025/01/24
- Re: map.el documentation, Robert Pluim, 2025/01/24
- Re: map.el documentation, Augusto Stoffel, 2025/01/24
- Re: map.el documentation, chad, 2025/01/24
- Re: map.el documentation, Robert Pluim, 2025/01/26
- Re: map.el documentation, Arash Esbati, 2025/01/23