From ed8b57cee72b4f7cc5b8d963dc9e2f43564f3160 Mon Sep 17 00:00:00 2001 From: kaoru Date: Tue, 26 May 2009 21:11:21 +0000 Subject: [PATCH] 2009-05-26 Vitaly Mayatskikh * elmo-util.el (elmo-union): New function, make a union of two lists. --- elmo/ChangeLog | 4 ++++ elmo/elmo-util.el | 4 ++++ 2 files changed, 8 insertions(+) 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))))) -- 1.7.10.4