Subject: Re: bug#49809: [PATCH] Add macro 'pcase-setq'

From: Michael Heerdegen <[email-masked]>
Date: Sat, 07 Aug 2021 04:11:55 +0200

Okam via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <[email-masked]> writes:

> +(defmacro pcase-setq (pat val &rest args)
> +  "Assign values to variables by destructuring with `pcase'.
> +
> +\(fn PATTERN VALUE PATTERN VALUE ...)"

Can we maybe enhance the docstring a bit?  I think we should at least
cover these points:

- The PATTERNs are normal `pcase' patterns, the VALUES are expressions.

- Evaluation happens sequentially as in `setq' (not in parallel)

- When a PATTERN doesn't match it's VALUE, the pair is silently skipped
  (completely, no partial assignments are performed, AFAIU)

Maybe adding a simple example would not be too bad as well?

Thanks,

Michael.