changeset 110595:ba4c4d4dddf5

* lisp/emacs-lisp/pcase.el (pcase-let*, pcase-let): plet -> pcase-let.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 27 Sep 2010 00:42:53 +0200
parents 76b6c21279ec
children 415e87a42437
files lisp/ChangeLog lisp/emacs-lisp/pcase.el
diffstat 2 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Sep 26 22:48:13 2010 +0200
+++ b/lisp/ChangeLog	Mon Sep 27 00:42:53 2010 +0200
@@ -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.
--- a/lisp/emacs-lisp/pcase.el	Sun Sep 26 22:48:13 2010 +0200
+++ b/lisp/emacs-lisp/pcase.el	Mon Sep 27 00:42:53 2010 +0200
@@ -76,8 +76,8 @@
 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 @@
 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) '()