diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-03-25 16:37:21 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-03-25 16:37:21 -0400 |
commit | 699c782b7668c44d0fa4446331b0590a6d5dac82 (patch) | |
tree | 5dcce364741d0761920a3d274b0fc8aba4103d45 /lisp/emacs-lisp/pcase.el | |
parent | 98fb480ee31bf74cf554044f60f21df16566dd7f (diff) | |
parent | e99a9b8bdccadded1f6fae88ee7a2a93dfd4eacf (diff) | |
download | emacs-699c782b7668c44d0fa4446331b0590a6d5dac82.tar.gz emacs-699c782b7668c44d0fa4446331b0590a6d5dac82.tar.bz2 emacs-699c782b7668c44d0fa4446331b0590a6d5dac82.zip |
Merge from trunk
Diffstat (limited to 'lisp/emacs-lisp/pcase.el')
-rw-r--r-- | lisp/emacs-lisp/pcase.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index e6c4ccbbc50..afbc5df85ce 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -1,6 +1,6 @@ ;;; pcase.el --- ML-style pattern-matching macro for Elisp -*- lexical-binding: t -*- -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: @@ -363,12 +363,12 @@ MATCH is the pattern that needs to be matched, of the form: (dolist (branch rest) (let* ((match (car branch)) (code&vars (cdr branch)) - (splitted + (split (pcase--split-match sym splitter match))) - (unless (eq (car splitted) :pcase--fail) - (push (cons (car splitted) code&vars) then-rest)) - (unless (eq (cdr splitted) :pcase--fail) - (push (cons (cdr splitted) code&vars) else-rest)))) + (unless (eq (car split) :pcase--fail) + (push (cons (car split) code&vars) then-rest)) + (unless (eq (cdr split) :pcase--fail) + (push (cons (cdr split) code&vars) else-rest)))) (cons (nreverse then-rest) (nreverse else-rest)))) (defun pcase--split-consp (syma symd pat) @@ -685,7 +685,7 @@ Otherwise, it defers to REST which is a list of branches of the form (pcase--if `(,(if (stringp qpat) #'equal #'eq) ,sym ',qpat) (pcase--u1 matches code vars then-rest) (pcase--u else-rest)))) - (t (error "Unkown QPattern %s" qpat)))) + (t (error "Unknown QPattern %s" qpat)))) (provide 'pcase) |