summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2010-09-27 00:42:53 +0200
committerStefan Monnier <monnier@iro.umontreal.ca>2010-09-27 00:42:53 +0200
commitc8871c5d0c2f466073b72f9196ab5bd7a7ec8072 (patch)
treedc1aad789c78155e4360ab1cc693c27ae4362b36 /lisp
parentadcc11110176f4ac76ab1861509af446715d2114 (diff)
downloademacs-c8871c5d0c2f466073b72f9196ab5bd7a7ec8072.tar.gz
* lisp/emacs-lisp/pcase.el (pcase-let*, pcase-let): plet -> pcase-let.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/emacs-lisp/pcase.el13
2 files changed, 11 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1e0b773e42e..64ce97a7955 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2010-09-26 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/pcase.el (pcase-let*, pcase-let): plet -> pcase-let.
+
2010-09-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
* net/gnutls.el (starttls-negotiate): Avoid the cl.el decf function.
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index b2b27a0e0d6..b922e0b0233 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -76,8 +76,8 @@ BODY should be an expression, and BINDINGS should be a list of bindings
of the form (UPAT EXP)."
(if (null bindings) body
`(pcase ,(cadr (car bindings))
- (,(caar bindings) (plet* ,(cdr bindings) ,body))
- (t (error "Pattern match failure in `plet'")))))
+ (,(caar bindings) (pcase-let* ,(cdr bindings) ,body))
+ (t (error "Pattern match failure in `pcase-let'")))))
;;;###autoload
(defmacro pcase-let (bindings body)
@@ -85,13 +85,14 @@ of the form (UPAT EXP)."
BODY should be an expression, and BINDINGS should be a list of bindings
of the form (UPAT EXP)."
(if (null (cdr bindings))
- `(plet* ,bindings ,body)
+ `(pcase-let* ,bindings ,body)
(setq bindings (mapcar (lambda (x) (cons (make-symbol "x") x)) bindings))
`(let ,(mapcar (lambda (binding) (list (nth 0 binding) (nth 2 binding)))
bindings)
- (plet* ,(mapcar (lambda (binding) (list (nth 1 binding) (nth 0 binding)))
- bindings)
- ,body))))
+ (pcase-let*
+ ,(mapcar (lambda (binding) (list (nth 1 binding) (nth 0 binding)))
+ bindings)
+ ,body))))
(defun pcase-expand (exp cases)
(let* ((defs (if (symbolp exp) '()