From: teranisi Date: Tue, 6 Aug 2002 13:21:37 +0000 (+0000) Subject: * elmo-util.el (elmo-list-delete): Added optional argument X-Git-Tag: elmo-mark-root~38 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=260a7a718cdcb1c9b5e7f6dff06646c33a7fdeef;p=elisp%2Fwanderlust.git * elmo-util.el (elmo-list-delete): Added optional argument DELETE-FUNCTION. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index e03c324..3306012 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,8 @@ 2002-08-06 Yuuichi Teranishi + * elmo-util.el (elmo-list-delete): Added optional argument + DELETE-FUNCTION. + * elmo-vars.el (elmo-imap4-default-mailbox): Abolished. * elmo-util.el (elmo-warning): Ignore errors while recenter. diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 5554f33..f8f3bf1 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -1100,13 +1100,15 @@ Emacs 19.28 or earlier does not have `unintern'." (setq lst (cdr lst))) result)) -(defun elmo-list-delete (list1 list2) +(defun elmo-list-delete (list1 list2 &optional delete-function) "Delete by side effect any occurrences equal to elements of LIST1 from LIST2. Return the modified LIST2. Deletion is done with `delete'. Write `(setq foo (elmo-list-delete bar foo))' to be sure of changing -the value of `foo'." +the value of `foo'. +If optional DELETE-FUNCTION is speficied, it is used as delete procedure." + (setq delete-function (or delete-function 'delete)) (while list1 - (setq list2 (delete (car list1) list2)) + (setq list2 (funcall delete-function (car list1) list2)) (setq list1 (cdr list1))) list2)