From 260a7a718cdcb1c9b5e7f6dff06646c33a7fdeef Mon Sep 17 00:00:00 2001 From: teranisi Date: Tue, 6 Aug 2002 13:21:37 +0000 Subject: [PATCH] * elmo-util.el (elmo-list-delete): Added optional argument DELETE-FUNCTION. --- elmo/ChangeLog | 3 +++ elmo/elmo-util.el | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) 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) -- 1.7.10.4