From: vitaly Date: Tue, 26 May 2009 15:04:41 +0000 (+0000) Subject: New helper function: elmo-union X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=8eba35e0399f56dd861a1c0b5308c704ce7f9cd4;p=elisp%2Fwanderlust.git New helper function: elmo-union Makes a union of two possibly unsorted lists. This function is needed for partial update, I forgot to include it... --- 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)))))