Re: [gnu] externals/qrencode 401bd9108bf 13/16: fix: More minor code cleanup.
Stefan Monnier <[email protected]> Sun, 02 Aug 2026 22:12:26 -0400
| Newsgroups | gmane.emacs.devel |
|---|---|
| Message-ID | <[email protected]> |
> Use cond instead of pcase which means we don't need the
> `qrencode--unused` hack. Also enforce a valid mode is set.
[...]
> - (pcase version
> - ((and n (guard (<=3D 1 n 9)))
> - (qrencode--unused n)
> + (cond
> + ((<=3D 1 version 9)
Side note: in Emacs=E2=89=A530 Pcase would let you use a pattern like:
(pred (<=3D 1 _ 9))
In older Emacsen you could have used:
(pred (lambda (n) (<=3D 1 n 9)))
Both would also have saved you from needing to use `ignore` (aka
`qrencode--unused`).
I still prefer the `cond` version, here, tho.
=3D=3D=3D Stefan