nnimap.el: Handle nil arg to nnimap-request-group
authorEric Abrahamsen <eric@ericabrahamsen.net>
Sat, 5 Sep 2015 02:09:04 +0000 (10:09 +0800)
committerEric Abrahamsen <eric@ericabrahamsen.net>
Sat, 5 Sep 2015 02:09:04 +0000 (10:09 +0800)
* nnimap.el (nnimap-request-group):  Handle nil "info" arg.  This arg
isn't always passed in, check it's not nil before making it into a list.
The active arg will also be nil if the group is new, check for that.

lisp/ChangeLog
lisp/nnimap.el

index 98536b0..7326267 100644 (file)
@@ -1,3 +1,10 @@
+2015-09-05  Eric Abrahamsen  <eric@ericabrahamsen.net>
+
+       * nnimap.el (nnimap-request-group):  Handle nil "info" arg.  This arg
+       isn't always passed in, check it's not nil before making it into a
+       list.  The active arg will also be nil if the group is new, check for
+       that.
+
 2015-09-03  Paul Eggert  <eggert@cs.ucla.edu>
 
        * gmm-utils.el (gmm-image-load-path-for-library):
index 20ba0a3..ac228f9 100644 (file)
@@ -807,6 +807,7 @@ textual parts.")
                     nil
                   group)
                 server))
+       (info (when info (list info)))
        active)
     (with-current-buffer nntp-server-buffer
       (when result
@@ -814,10 +815,11 @@ textual parts.")
                  (not (setq active
                             (nth 2 (assoc group nnimap-current-infos)))))
          (let ((sequences (nnimap-retrieve-group-data-early
-                           server (list info))))
-           (nnimap-finish-retrieve-group-infos server (list info) sequences
+                           server info)))
+           (nnimap-finish-retrieve-group-infos server info sequences
                                                t)
            (setq active (nth 2 (assoc group nnimap-current-infos)))))
+       (setq active (or active '(0 . 1)))
        (erase-buffer)
        (insert (format "211 %d %d %d %S\n"
                        (- (cdr active) (car active))