Register the last command time so that we can use it for idling NOOPs.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Fri, 24 Sep 2010 16:21:05 +0000 (18:21 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Fri, 24 Sep 2010 16:21:05 +0000 (18:21 +0200)
lisp/ChangeLog
lisp/nnimap.el

index fc00cc9..b4080cc 100644 (file)
@@ -1,5 +1,8 @@
 2010-09-24  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * nnimap.el (nnimap-command): Register the last command time so
+       that we can use it for idling NOOPs.
+
        * starttls.el: (starttls-open-stream): Add autoload cookie.
 
 2010-09-24  Michael Welsh Duggan  <md5i@md5i.com>  (tiny change)
index 42fe4d4..f9013bc 100644 (file)
@@ -91,7 +91,8 @@ not done by default on servers that doesn't support that command.")
   "Internal variable with default value for `nnimap-split-download-body'.")
 
 (defstruct nnimap
-  group process commands capabilities select-result newlinep server)
+  group process commands capabilities select-result newlinep server
+  last-command-time)
 
 (defvar nnimap-object nil)
 
@@ -986,6 +987,7 @@ not done by default on servers that doesn't support that command.")
 
 (defun nnimap-command (&rest args)
   (erase-buffer)
+  (setf (nnimap-last-command-time) (current-time))
   (let* ((sequence (apply #'nnimap-send-command args))
         (response (nnimap-get-response sequence)))
     (if (equal (caar response) "OK")