From d8d756111b195191edd9446278d51c5950e94a1d Mon Sep 17 00:00:00 2001 From: okazaki Date: Thu, 15 Dec 2005 20:35:01 +0000 Subject: [PATCH] (elmo-list-filter): Rewritten. --- elmo/elmo-util.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index be16dc3..67783fd 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -882,8 +882,12 @@ the directory becomes empty after deletion." )))) (defun elmo-list-filter (l1 l2) - "Rerurn a list from L2 in which each element is a member of L1." - (elmo-delete-if (lambda (x) (not (memq x l1))) l2)) + "Return a list from L2 in which each element is a member of L1." + (let (result) + (dolist (element l2) + (if (memq element l1) + (setq result (cons element result)))) + (nreverse result))) (defsubst elmo-list-delete-if-smaller (list number) (let ((ret-val (copy-sequence list))) -- 1.7.10.4