From: okazaki Date: Thu, 15 Dec 2005 20:35:01 +0000 (+0000) Subject: (elmo-list-filter): Rewritten. X-Git-Tag: wl-2_15_3~30 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d8d756111b195191edd9446278d51c5950e94a1d;p=elisp%2Fwanderlust.git (elmo-list-filter): Rewritten. --- 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)))