# HG changeset patch # User Stefan Monnier # Date 1289525706 18000 # Node ID df6573cbdd34d75e95483bd21a31dffbccc203eb # Parent 5b30cfe2d392ef340e290c75ef5dea9c17d8e056 * lisp/emacs-lisp/pcase.el (pcase-let*, pcase-let): Add debug and indentation specs. diff -r 5b30cfe2d392 -r df6573cbdd34 lisp/ChangeLog --- a/lisp/ChangeLog Thu Nov 11 23:51:05 2010 +0000 +++ b/lisp/ChangeLog Thu Nov 11 20:35:06 2010 -0500 @@ -1,3 +1,8 @@ +2010-11-12 Stefan Monnier + + * emacs-lisp/pcase.el (pcase-let*, pcase-let): Add debug and + indentation specs. + 2010-11-11 Stefan Monnier * progmodes/modula2.el: Use SMIE and skeleton. @@ -57,7 +62,7 @@ * emacs-lisp/package.el (package-read-all-archive-contents): Reset package-archive-contents to nil before re-reading. -2010-11-10 Brandon Craig Rhodes +2010-11-10 Brandon Craig Rhodes (tiny change) * textmodes/flyspell.el (flyspell-word): Do not re-check words already found as misspellings by (flyspell-large-region), just diff -r 5b30cfe2d392 -r df6573cbdd34 lisp/emacs-lisp/pcase.el --- a/lisp/emacs-lisp/pcase.el Thu Nov 11 23:51:05 2010 +0000 +++ b/lisp/emacs-lisp/pcase.el Thu Nov 11 20:35:06 2010 -0500 @@ -75,7 +75,7 @@ E.g. you can match pairs where the cdr is larger than the car with a pattern like `(,a . ,(pred (< a))) or, with more checks: `(,(and a (pred numberp)) . ,(and (pred numberp) (pred (< a))))" - (declare (indent 1) (debug case)) + (declare (indent 1) (debug case)) ;FIXME: edebug `guard' and vars. (or (gethash (cons exp cases) pcase-memoize) (puthash (cons exp cases) (pcase-expand exp cases) @@ -86,6 +86,7 @@ "Like `let*' but where you can use `pcase' patterns for bindings. BODY should be an expression, and BINDINGS should be a list of bindings of the form (UPAT EXP)." + (declare (indent 1) (debug let)) (if (null bindings) body `(pcase ,(cadr (car bindings)) (,(caar bindings) (pcase-let* ,(cdr bindings) ,body)) @@ -98,6 +99,7 @@ "Like `let' but where you can use `pcase' patterns for bindings. BODY should be an expression, and BINDINGS should be a list of bindings of the form (UPAT EXP)." + (declare (indent 1) (debug let)) (if (null (cdr bindings)) `(pcase-let* ,bindings ,body) (setq bindings (mapcar (lambda (x) (cons (make-symbol "x") x)) bindings))