+2001-08-17 Simon Josefsson <jas@extundo.com>
+
+ * imap.el (imap-wait-for-tag): If process-status isn't open or
+ run, return nil instead of sit-for looping.
+
2001-08-17 10:41:14 Lars Magne Ingebrigtsen <larsi@gnus.org>
* lpath.el (featurep): fbind xml-parse-region.
(defun imap-wait-for-tag (tag &optional buffer)
(with-current-buffer (or buffer (current-buffer))
(while (and (null imap-continuation)
+ (memq (process-status imap-process) '(open run))
(< imap-reached-tag tag))
- (or (and (not (memq (process-status imap-process) '(open run)))
- (sit-for 1))
- (let ((len (/ (point-max) 1024))
- message-log-max)
- (unless (< len 10)
- (message "imap read: %dk" len))
- (accept-process-output imap-process 1))))
+ (let ((len (/ (point-max) 1024))
+ message-log-max)
+ (unless (< len 10)
+ (message "imap read: %dk" len))
+ (accept-process-output imap-process 1)))
(message "")
- (or (assq tag imap-failed-tags)
- (if imap-continuation
- 'INCOMPLETE
- 'OK))))
+ (and (memq (process-status imap-process) '(open run))
+ (or (assq tag imap-failed-tags)
+ (if imap-continuation
+ 'INCOMPLETE
+ 'OK)))))
(defun imap-sentinel (process string)
(delete-process process))