From: okazaki Date: Sun, 24 Sep 2000 12:18:41 +0000 (+0000) Subject: * elmo-util.el (elmo-list-delete): Doc fix. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dd270ef2225f17d6ec0ad1a84716eaf02138bb1;p=elisp%2Fwanderlust.git * 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'. --- diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index e32ae93..9af7aa9 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -1333,13 +1333,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) @@ -1350,7 +1343,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 aa13003..2905b77 100644 --- a/elmo/elmo2.el +++ b/elmo/elmo2.el @@ -827,7 +827,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))))))