From 5da9e810bfb29a4b76e25dcaac72dd7563462202 Mon Sep 17 00:00:00 2001 From: okazaki Date: Sun, 24 Sep 2000 12:56:25 +0000 Subject: [PATCH] * elmo-util.el (elmo-list-delete): Doc fix. (elmo-delete-lists): Abolish. * elmo2.el (elmo-crosspost-message-delete): Use `elmo-list-delete' instead of `elmo-delete-lists'. --- elmo/elmo-util.el | 12 ++++-------- elmo/elmo2.el | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 362a361..6388fed 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -1419,13 +1419,6 @@ Otherwise treat \\ in NEWTEXT string as special: (` (when (elmo-buffer-exists-p (, buffer)) (kill-buffer (, buffer))))) -(defun elmo-delete-lists (keys list) - "Delete all entries in LIST that equal to KEYS." - (while keys - (setq list (delete (car keys) list)) - (setq keys (cdr keys))) - list) - (defun elmo-delete-if (pred lst) "Returns new list contains items which don't satisfy PRED in LST." (let (result) @@ -1436,7 +1429,10 @@ Otherwise treat \\ in NEWTEXT string as special: result)) (defun elmo-list-delete (list1 list2) - "Any element of list1 is deleted from list2." + "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'." (while list1 (setq list2 (delete (car list1) list2)) (setq list1 (cdr list1))) diff --git a/elmo/elmo2.el b/elmo/elmo2.el index 195ca02..62545bc 100644 --- a/elmo/elmo2.el +++ b/elmo/elmo2.el @@ -800,7 +800,7 @@ without cacheing." (let* ((id-fld (assoc message-id elmo-crosspost-message-alist)) (folder-list (nth 1 id-fld))) (when id-fld - (if (setq folder-list (elmo-delete-lists folders folder-list)) + (if (setq folder-list (elmo-list-delete folders folder-list)) (setcar (cdr id-fld) folder-list) (setq elmo-crosspost-message-alist (delete id-fld elmo-crosspost-message-alist)))))) -- 1.7.10.4