[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 2a54e8d 1/3: Better syntax for the map pcase patter
From: |
Nicolas Petton |
Subject: |
[Emacs-diffs] master 2a54e8d 1/3: Better syntax for the map pcase pattern |
Date: |
Fri, 05 Jun 2015 23:55:46 +0000 |
branch: master
commit 2a54e8dfff722014d6d709ccfe53230e551b9c22
Author: Nicolas Petton <address@hidden>
Commit: Nicolas Petton <address@hidden>
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.
---
lisp/emacs-lisp/map.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el
index b332cf4..a0792d9 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."
"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))