From 206d03872eaee5a1a1ad9d504ce3b6c3139114ef Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 30 Aug 2009 14:23:21 +0000 Subject: [PATCH] (imap-send-command): Simplify. (imap-wait-for-tag): point-max - buffer-size. --- lisp/ChangeLog | 3 +++ lisp/net/imap.el | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 23e238b88b8..75c697ca72d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-08-30 Stefan Monnier + * net/imap.el (imap-send-command): Simplify. + (imap-wait-for-tag): point-max - buffer-size. + * net/ange-ftp.el (internal-ange-ftp-mode): Use define-derived-mode. * emacs-lisp/easy-mmode.el (define-minor-mode): Don't use symbol-value diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 88e897fa32e..fb5dc2ac60c 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el @@ -2004,10 +2004,11 @@ on failure." (imap-send-command-1 cmdstr) (setq cmdstr nil) (unwind-protect - (if (not (eq (imap-wait-for-tag tag) 'INCOMPLETE)) - (setq command nil) ;; abort command if no cont-req - (setq command (cons (funcall cmd imap-continuation) - command))) + (setq command + (if (not (eq (imap-wait-for-tag tag) 'INCOMPLETE)) + nil ;; abort command if no cont-req + (cons (funcall cmd imap-continuation) + command))) (setq imap-continuation nil))) (t (error "Unknown command type")))) @@ -2021,7 +2022,7 @@ on failure." (while (and (null imap-continuation) (memq (process-status imap-process) '(open run)) (< imap-reached-tag tag)) - (let ((len (/ (point-max) 1024)) + (let ((len (/ (buffer-size) 1024)) message-log-max) (unless (< len 10) (setq imap-have-messaged t) -- 2.39.5