update.
[elisp/apel.git] / calist.el
index 154e105..3c27b9f 100644 (file)
--- a/calist.el
+++ b/calist.el
   (if (null rule-tree)
       alist
     (let ((type (car rule-tree))
-         (choices (cdr rule-tree))
-         default)
+         (choices (cdr rule-tree)))
       (catch 'tag
        (while choices
          (let* ((choice (car choices))
-                (choice-value (car choice)))
-           (if (eq choice-value t)
-               (setq default choice)
-             (let ((ret-alist (calist-field-match alist type (car choice))))
-               (if ret-alist
-                   (throw 'tag
-                          (if (cdr choice)
-                              (ctree-match-calist (cdr choice) ret-alist)
-                            ret-alist))
-                 ))))
-         (setq choices (cdr choices)))
-       (if default
-           (let ((ret-alist (calist-field-match alist type t)))
-             (if ret-alist
-                 (if (cdr default)
-                     (ctree-match-calist (cdr default) ret-alist)
-                   ret-alist))))
-       ))))
+                (ret-alist (calist-field-match alist type (car choice))))
+           (if ret-alist
+               (throw 'tag
+                      (if (cdr choice)
+                          (ctree-match-calist (cdr choice) ret-alist)
+                        ret-alist))))
+         (setq choices (cdr choices))))
+      )))
 
 (defun calist-to-ctree (calist)
   "Convert condition-alist CALIST to condition-tree."