(*-request-set-mark): Extend syntax with 'set.
[gnus] / lisp / nntp.el
index 946025a..1e33055 100644 (file)
@@ -1,8 +1,8 @@
 ;;; nntp.el --- nntp access for Gnus
 
-;; Copyright (C) 1987, 1988, 1989, 1990, 1992, 1993,
-;;   1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002,
-;;   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1987, 1988, 1989, 1990, 1992, 1993, 1994, 1995, 1996,
+;;   1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+;;   2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -1122,15 +1122,18 @@ command whose response triggered the error."
       (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 nntp-marks (gnus-update-alist-soft
-                           mark
-                           (funcall (if (eq what 'add) 'gnus-range-add
-                                      'gnus-remove-from-range)
-                                    (cdr (assoc mark nntp-marks)) range)
-                           nntp-marks)))))
+         (setq nntp-marks
+               (gnus-update-alist-soft
+                mark
+                (cond
+                 ((eq what 'add)
+                  (gnus-range-add (cdr (assoc mark nntp-marks)) range)
+                 ((eq what 'del)
+                  (gnus-remove-from-range (cdr (assoc mark nntp-marks)) range))
+                 ((eq what 'set)
+                  range)))
+                nntp-marks)))))
     (nntp-save-marks group server))
   nil)
 
@@ -1172,7 +1175,7 @@ It will make innd servers spawn an nnrpd process to allow actual article
 reading."
   (nntp-send-command "^.*\n" "MODE READER"))
 
-(declare-function netrc-parse "netrc" (file))
+(declare-function netrc-parse "netrc" (&optional file))
 (declare-function netrc-machine "netrc"
                  (list machine &optional port defaultport))
 (declare-function netrc-get "netrc" (alist type))