From 485b35a99c84e1a521e6285fae07f5e273b1eb88 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 24 Nov 1999 13:37:43 +0000 Subject: [PATCH] (gnus-union): New function. --- lisp/gnus-util.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index de5e352..d7a81f8 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -1005,6 +1005,15 @@ ARG is passed to the first function." (car (symbol-value sym)))))) hashtb)))) +(defun gnus-union (a b) + "Add members of list A to list B +if they are not equal to items already in B." + (if (null a) + b + (if (member (car a) b) + (gnus-union (cdr a) b) + (gnus-union (cdr a) (cons (car a) b))))) + (provide 'gnus-util) ;;; gnus-util.el ends here -- 1.7.10.4