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 #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Okam <okamsn <at> protonmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Add macro 'pcase-setq'
Date: Sun, 01 Aug 2021 17:20:41 +0000
[Message part 1 (text/plain, inline)]
Hello,

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))


Please let me know what should be changed.

Thank you.
[0001-Add-macro-pcase-setq.patch (text/x-patch, attachment)]

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

Previous Next


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