mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-24 14:30:43 -08:00
Better syntax for the map pcase pattern
* lisp/emacs-lisp/map.el: Improves the map pcase pattern to take bindings of the form (KEY PAT) or SYMBOL. KEY is not quoted.
This commit is contained in:
parent
cd22663b85
commit
2a54e8dfff
1 changed files with 1 additions and 1 deletions
|
|
@ -360,7 +360,7 @@ If KEY is not found, return DEFAULT which defaults to nil."
|
|||
"Return a list of pcase bindings from ARGS to the elements of a map."
|
||||
(seq-map (lambda (elt)
|
||||
(if (consp elt)
|
||||
`(app (pcase--flip map-elt ',(car elt)) ,(cdr elt))
|
||||
`(app (pcase--flip map-elt ,(car elt)) ,(cadr elt))
|
||||
`(app (pcase--flip map-elt ',elt) ,elt)))
|
||||
args))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue