diff lisp/gnus/nnml.el @ 111721:7bb815042e61

nnml.el, nnfolder.el, nntp.el (*-request-set-mark): Extend syntax with 'set. nnheader.el, nntp.el, nnfolder.el, nnml.el (*-request-set-mark): Refactor out nnheader-update-marks-actions and use it throughout. nnmaildir.el (nnmaildir-request-set-mark): Be explicit about 'set. gnus-sum.el (gnus-summary-push-marks-to-backend): Use 'set instead of 'add and 'delete to set backend marks.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Fri, 26 Nov 2010 02:11:40 +0000
parents 867180d035b0
children 52100bac91db
line wrap: on
line diff
--- a/lisp/gnus/nnml.el	Fri Nov 26 01:27:37 2010 +0000
+++ b/lisp/gnus/nnml.el	Fri Nov 26 02:11:40 2010 +0000
@@ -1033,19 +1033,7 @@
   (nnml-possibly-change-directory group server)
   (unless nnml-marks-is-evil
     (nnml-open-marks group server)
-    (dolist (action actions)
-      (let ((range (nth 0 action))
-	    (what  (nth 1 action))
-	    (marks (nth 2 action)))
-	(assert (or (eq what 'add) (eq what 'del)) nil
-		"Unknown request-set-mark action: %s" what)
-	(dolist (mark marks)
-	  (setq nnml-marks (gnus-update-alist-soft
-			    mark
-			    (funcall (if (eq what 'add) 'gnus-range-add
-				       'gnus-remove-from-range)
-				     (cdr (assoc mark nnml-marks)) range)
-			    nnml-marks)))))
+    (setq nnml-marks (nnheader-update-marks-actions nnml-marks actions))
     (nnml-save-marks group server))
   nil)