Subject: bug#34842: 26.1; Alist documentation: let-alist

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 13 Oct 2019 01:32:04 +0200

Sebastián Monía <[email-masked]> writes:

> The macro let-alist is too useful to work with JSON-parsed data for it to be
> missing from the docs.
>
> In the page
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Association-Lists.html
> we should add some documentation about it. Below a suggestion.
>
> Thank you!
>
> — Macro: let-alist `value`
> Creates a binding for each symbol in the association list `value`, prefixed with
> dot. This is very useful when accessing several items in the same alist, and it's
> best understood through a simple example:
>
> (setq colors '((rose red) (lily white) (buttercup yellow)))
> (let-alist colors
>     (print .rose)
>     (print .buttercup))
>     ⇒ red
>     ⇒ yellow

Even though I question the usefulness of this macro (especially since it
doesn't nest well, so it seems just kinda ad-hoc), I've now documented
it along the lines you suggest.  Drew wanted the manual to describe more
fully the actual details behind the implementation, but I think that
doesn't add much clarity.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no