projects
/
elisp
/
apel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
79d73df
)
(ctree-find-calist): Add optional argument 'all.
author
morioka
<morioka>
Mon, 27 Apr 1998 12:55:07 +0000
(12:55 +0000)
committer
morioka
<morioka>
Mon, 27 Apr 1998 12:55:07 +0000
(12:55 +0000)
calist.el
patch
|
blob
|
history
diff --git
a/calist.el
b/calist.el
index
38f4889
..
ee643b6
100644
(file)
--- a/
calist.el
+++ b/
calist.el
@@
-84,7
+84,7
@@
ret-alist))))
))))
ret-alist))))
))))
-(defun ctree-find-calist (rule-tree alist)
+(defun ctree-find-calist (rule-tree alist &optional all)
"Return list of condition-alist which matches ALIST in RULE-TREE."
(if (null rule-tree)
(list alist)
"Return list of condition-alist which matches ALIST in RULE-TREE."
(if (null rule-tree)
(list alist)
@@
-100,20
+100,25
@@
(if ret-alist
(if (cdr choice)
(setq dest
(if ret-alist
(if (cdr choice)
(setq dest
- (append
- (ctree-find-calist (cdr choice) ret-alist)
- dest))
+ (append (ctree-find-calist
+ (cdr choice) ret-alist all)
+ dest))
(setq dest (cons ret-alist dest))
)))))
(setq choices (cdr choices)))
(setq dest (cons ret-alist dest))
)))))
(setq choices (cdr choices)))
- (or dest
+ (or (and (not all) dest)
(if default
(let ((ret-alist (calist-field-match alist type t)))
(if ret-alist
(if (cdr default)
(if default
(let ((ret-alist (calist-field-match alist type t)))
(if ret-alist
(if (cdr default)
- (ctree-find-calist (cdr default) ret-alist)
- (list ret-alist)
- ))))))))
+ (setq dest
+ (append (ctree-find-calist
+ (cdr default) ret-alist all)
+ dest))
+ (setq dest (cons ret-alist dest))
+ ))))
+ )
+ dest)))
(defun calist-to-ctree (calist)
"Convert condition-alist CALIST to condition-tree."
(defun calist-to-ctree (calist)
"Convert condition-alist CALIST to condition-tree."