From: kaoru Date: Tue, 26 May 2009 21:11:21 +0000 (+0000) Subject: 2009-05-26 Vitaly Mayatskikh X-Git-Tag: elmo-imap4-compliance-root~96 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ed8b57cee72b4f7cc5b8d963dc9e2f43564f3160;p=elisp%2Fwanderlust.git 2009-05-26 Vitaly Mayatskikh * elmo-util.el (elmo-union): New function, make a union of two lists. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 72266a1..132dd45 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,7 @@ +2009-05-26 Vitaly Mayatskikh + + * elmo-util.el (elmo-union): New function, make a union of two lists. + 2009-05-26 TAKAHASHI Kaoru * elmo-version.el (elmo-version): Up to 2.15.7. diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index f5191fb..b796432 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -485,6 +485,10 @@ Return value is a cons cell of (STRUCTURE . REST)" (setq list (cdr list)))) list) +(defun elmo-union (l1 l2) + "Make a union of two lists" + (elmo-uniq-sorted-list (sort (append l1 l2) #'<))) + (defun elmo-list-insert (list element after) (let* ((match (memq after list)) (rest (and match (cdr (memq after list)))))