GNU bug report logs - #49809
[PATCH] Add macro 'pcase-setq'

Previous Next

Package: emacs;

Reported by: Okam <okamsn <at> protonmail.com>

Date: Sun, 1 Aug 2021 17:21:01 UTC

Severity: normal

Tags: patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 49809 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Okam <okamsn <at> protonmail.com>
Cc: 49809 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#49809: [PATCH] Add macro 'pcase-setq'
Date: Wed, 04 Aug 2021 09:14:16 +0200
Okam <okamsn <at> protonmail.com> writes:

> This patch adds a `setq`-like equivalent to `pcase-let`.  This is
> convenient when one wants the bindings to exist outside of a `let` form.
>
> This macro expands into multiple `setq` calls that are combined where
> possible.
>
>      ;; => (1 2 3 4)
>      (let (a b c d)
>        (pcase-setq a 1
>                    b 2
>                    `[,c ,d] [3 4])
>        (list a b c d))

Perhaps Stefan has an opinion here; added to the CCs.

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




This bug report was last modified 3 years and 277 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.