[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49809: [PATCH] Add macro 'pcase-setq'
From: |
Michael Heerdegen |
Subject: |
bug#49809: [PATCH] Add macro 'pcase-setq' |
Date: |
Fri, 13 Aug 2021 04:55:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> > (pcase-setq (or `((,a) [(,b)])
> > x)
> > '((1) [(2)]))
> > (list a b x)) ;; ==> (1 2 nil)
>
> If you want to do different things depending on which pattern matches
> you should use `pcase` rather than `pcase-setq` (or `pcase-let` for
> that matter).
Is using a pattern like
(or `[,a ,b] `[,a ,b ,_])
ok?
Michael.
- bug#49809: [PATCH] Add macro 'pcase-setq', (continued)
bug#49809: [PATCH] Add macro 'pcase-setq', Okam, 2021/08/06
- bug#49809: [PATCH] Add macro 'pcase-setq', Michael Heerdegen, 2021/08/06
- bug#49809: [PATCH] Add macro 'pcase-setq', Lars Ingebrigtsen, 2021/08/11
- bug#49809: [PATCH] Add macro 'pcase-setq', Michael Heerdegen, 2021/08/12
- bug#49809: [PATCH] Add macro 'pcase-setq', Okam, 2021/08/12
- bug#49809: [PATCH] Add macro 'pcase-setq', Stefan Monnier, 2021/08/12
- bug#49809: [PATCH] Add macro 'pcase-setq',
Michael Heerdegen <=
- bug#49809: [PATCH] Add macro 'pcase-setq', Stefan Monnier, 2021/08/13
- bug#49809: [PATCH] Add macro 'pcase-setq', Michael Heerdegen, 2021/08/13
bug#49809: [PATCH] Add macro 'pcase-setq', Stefan Monnier, 2021/08/07
bug#49809: [PATCH] Add macro 'pcase-setq', Michael Heerdegen, 2021/08/08
bug#49809: [PATCH] Add macro 'pcase-setq', Stefan Monnier, 2021/08/09
bug#49809: [PATCH] Add macro 'pcase-setq', Michael Heerdegen, 2021/08/09
bug#49809: [PATCH] Add macro 'pcase-setq', Stefan Monnier, 2021/08/12