summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'match.c')
-rw-r--r--match.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/match.c b/match.c
index c77a4e7d..6f151c7b 100644
--- a/match.c
+++ b/match.c
@@ -366,8 +366,14 @@ static val dest_bind(val spec, val bindings, val pattern,
lisp_evaled = t;
}
- if (lisp_evaled)
- return if3(tree_find(value, ret, swap_12_21(testfun)), bindings, t);
+ if (lisp_evaled) {
+ if (!opt_compat || opt_compat >= 184)
+ if (tree_find(ret, value, testfun))
+ return bindings;
+ if (tree_find(value, ret, swap_12_21(testfun)))
+ return bindings;
+ return t;
+ }
while (consp(piter) && consp(viter))
{
@@ -386,6 +392,10 @@ static val dest_bind(val spec, val bindings, val pattern,
return funcall2(testfun, piter, viter) ? bindings : t;
}
return bindings;
+ } else if ((!opt_compat || opt_compat >= 184) &&
+ tree_find(pattern, value, testfun))
+ {
+ return bindings;
} else if (tree_find(value, pattern, swap_12_21(testfun))) {
return bindings;
}