X-Git-Url: https://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Fnnimap.el;fp=lisp%2Fnnimap.el;h=e619c0f13c29dd16863ea70c291599fb0d6732f8;hp=205f92cd90ac774f04e718e118eccc98ecf30b4f;hb=6bf0b14d55ac93a35e2444c09cc2d6c060d1fb54;hpb=c2b17919646859aef0e1d329e052dadbbf042eca diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 205f92cd9..e619c0f13 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -1021,20 +1021,20 @@ textual parts.") (defun nnimap-find-expired-articles (group) (let ((cutoff (nnmail-expired-article-p group nil nil))) - (with-current-buffer (nnimap-buffer) - (let ((result - (nnimap-command - "UID SEARCH SENTBEFORE %s" - (format-time-string - (format "%%d-%s-%%Y" - (upcase - (car (rassoc (nth 4 (decode-time cutoff)) - parse-time-months)))) - cutoff)))) - (and (car result) - (delete 0 (mapcar #'string-to-number - (cdr (assoc "SEARCH" (cdr result)))))))))) - + (when cutoff + (with-current-buffer (nnimap-buffer) + (let ((result + (nnimap-command + "UID SEARCH SENTBEFORE %s" + (format-time-string + (format "%%d-%s-%%Y" + (upcase + (car (rassoc (nth 4 (decode-time cutoff)) + parse-time-months)))) + cutoff)))) + (and (car result) + (delete 0 (mapcar #'string-to-number + (cdr (assoc "SEARCH" (cdr result))))))))))) (defun nnimap-find-article-by-message-id (group server message-id &optional limit)