aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Petton2015-06-06 01:50:32 +0200
committerNicolas Petton2015-06-06 01:50:32 +0200
commit2a54e8dfff722014d6d709ccfe53230e551b9c22 (patch)
treeb40648f7c7ddcf5e43b33ccc89399dd5ef6e7fd4
parentcd22663b8521f2cc34b260fc097e189428535b29 (diff)
downloademacs-2a54e8dfff722014d6d709ccfe53230e551b9c22.tar.gz
emacs-2a54e8dfff722014d6d709ccfe53230e551b9c22.zip
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.
-rw-r--r--lisp/emacs-lisp/map.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el
index b332cf47dd4..a0792d97879 100644
--- 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."
360 "Return a list of pcase bindings from ARGS to the elements of a map." 360 "Return a list of pcase bindings from ARGS to the elements of a map."
361 (seq-map (lambda (elt) 361 (seq-map (lambda (elt)
362 (if (consp elt) 362 (if (consp elt)
363 `(app (pcase--flip map-elt ',(car elt)) ,(cdr elt)) 363 `(app (pcase--flip map-elt ,(car elt)) ,(cadr elt))
364 `(app (pcase--flip map-elt ',elt) ,elt))) 364 `(app (pcase--flip map-elt ',elt) ,elt)))
365 args)) 365 args))
366 366