*** empty log message ***
[gnus] / lisp / gnus-agent.el
index db6cf94..12efc52 100644 (file)
@@ -535,7 +535,8 @@ the actual number of articles toggled is returned."
           (file (gnus-agent-lib-file "active")))
       (gnus-make-directory (file-name-directory file))
       (nnheader-temp-write file
-       (insert-file-contents file)
+       (when (file-exists-p file)
+         (insert-file-contents file))
        (goto-char (point-min))
        (when (re-search-forward (concat "^" (regexp-quote group) " ") nil t)
          (gnus-delete-line))
@@ -1358,9 +1359,11 @@ The following commands are available:
               (setq gnus-agent-article-alist (cdr first))
               ;;; Mark all articles up to the first article
               ;;; in `gnus-article-alist' as read.
-              (setcar (nthcdr 2 info)
-                      (gnus-range-add
-                       (nth 2 info) (cons 1 (- (caar gnus-agent-article-alist) 1))))
+              (when (caar gnus-agent-article-alist)
+                (setcar (nthcdr 2 info)
+                        (gnus-range-add
+                         (nth 2 info)
+                         (cons 1 (- (caar gnus-agent-article-alist) 1)))))
               (gnus-dribble-enter
                (concat "(gnus-group-set-info '"
                        (gnus-prin1-to-string info)