diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-01-09 09:36:10 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-01-09 09:36:10 -0800 |
commit | 35cf62d95cdcd5323dcea4a5385942c342ff1d9c (patch) | |
tree | 90358cbb033a126c4d48793a80fd804b7baaca24 /lisp/emacs-lisp/pcase.el | |
parent | 59815c02506eb39b61e672528ed03885749ba529 (diff) | |
parent | 7655cb66d86564e792b825f1a0e1a4de7d6e6db5 (diff) | |
download | emacs-35cf62d95cdcd5323dcea4a5385942c342ff1d9c.tar.gz |
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) |