Subject: Re: bug#75170: add-to-alist: new function

From: Stefan Kangas <[email-masked]>
Date: Tue, 21 Jan 2025 03:12:43 -0600

"Alfred M. Szmidt" <[email-masked]> writes:

>    map-put! does not work well with alists that are not 'proper':
>
>        ELISP> (setq x (list 1 '(2 . 3)))
>        (1 (2 . 3))
>
> Why should it work on alists at all?  map-put! assumes a map (where is
> this structure documented? I did not see anything in the Elisp
> manual), not an alist.  Invalid alists will also not work on functions
> that assume alists.

According to M-x describe-package RET map RET:

map.el provides generic map-manipulation functions that work on
alists, plists, hash-tables, and arrays.  All functions are
prefixed with "map-".