projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd22663
)
Better syntax for the map pcase pattern
author
Nicolas Petton
<nicolas@petton.fr>
Fri, 5 Jun 2015 23:50:32 +0000
(
01:50
+0200)
committer
Nicolas Petton
<nicolas@petton.fr>
Fri, 5 Jun 2015 23:50:32 +0000
(
01:50
+0200)
* lisp/emacs-lisp/map.el: Improves the map pcase pattern to take
bindings of the form (KEY PAT) or SYMBOL. KEY is not quoted.
lisp/emacs-lisp/map.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/map.el
b/lisp/emacs-lisp/map.el
index b332cf47dd42927226a0223b7f76111ca6374efd..a0792d978798818234605abcc5aefb381ade95d9 100644
(file)
--- a/
lisp/emacs-lisp/map.el
+++ b/
lisp/emacs-lisp/map.el
@@
-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)) ,(c
dr elt))
+ `(app (pcase--flip map-elt
,(car elt)) ,(ca
dr elt))
`(app (pcase--flip map-elt ',elt) ,elt)))
args))