From: Stefan Monnier Date: Sun, 26 Sep 2010 22:42:53 +0000 (+0200) Subject: * lisp/emacs-lisp/pcase.el (pcase-let*, pcase-let): plet -> pcase-let. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~47^2~42^2~3 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=15413fb4286715ba79c3e6fb20c0df1a125770f8;p=emacs.git * lisp/emacs-lisp/pcase.el (pcase-let*, pcase-let): plet -> pcase-let. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 50fdd4bc54e..d7cde04306b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-09-26 Stefan Monnier + + * emacs-lisp/pcase.el (pcase-let*, pcase-let): plet -> pcase-let. + 2010-09-26 Lars Magne Ingebrigtsen * 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) '()