Update of /project/cl-unification/cvsroot/cl-unification
In directory clnet:/tmp/cvs-serv31824
Modified Files:
match-block.lisp
Log Message:
See previous message.
--- /project/cl-unification/cvsroot/cl-unification/match-block.lisp 2005/10/25 19:08:15 1.6
+++ /project/cl-unification/cvsroot/cl-unification/match-block.lisp 2007/05/21 12:33:07 1.7
@@ -10,7 +10,7 @@
(defmacro match ((template object
&key
- (substitution (make-empty-environment))
+ (substitution '(make-empty-environment))
(errorp t)
(error-value nil))
&body forms)
@@ -39,7 +39,7 @@
)
`(block nil
(handler-case
- (let* ((,env-var (unify ',template ,object ,substitution))
+ (let* ((,env-var (unify ,template ,object ,substitution))
,@(generate-var-bindings)
)
(declare (ignorable ,@(mapcar #'first (generate-var-bindings))))
@@ -49,7 +49,7 @@
(unification-failure (uf)
(if ,errorp
- (signal uf)
+ (error uf)
,error-value))
)))))
@@ -155,7 +155,7 @@
<form> and <forms> are regular Common Lisp forms.
<template> is a unification template.
-The full syntax of MATCHING is
+The full syntax of MATCH-CASE is
match-case <object> (&key errorp default-substitution) <clauses>
@@ -163,7 +163,7 @@
present in the template are bound lexically. Note that both variable
names '?FOO' and 'FOO' are bound for convenience.
-The values returned by the MATCHING form are those of the last form in
+The values returned by the MATCH-CASE form are those of the last form in
the first clause that satisfies the match test.
If ERRORP is non-NIL then if none of the regular clauses matches, then
@@ -188,7 +188,7 @@
)
(labels ((generate-matchers (clauses)
(if (null clauses)
- otherwise-clause
+ `(progn ,@(rest otherwise-clause))
(destructuring-bind (pattern &rest body)
(car clauses)
`(handler-case (match (,pattern ,object-var)