From: Lars Magne Ingebrigtsen Date: Sun, 5 Sep 2010 00:52:55 +0000 (+0000) Subject: pop3.el (pop3-movemail): Use erase-buffer instead of looping and deleting regions... X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~48^2~84 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ef45ee6fc8066898f1edc637b2fd3b5474b0fb9e;p=emacs.git pop3.el (pop3-movemail): Use erase-buffer instead of looping and deleting regions, which seems rather odd; gnus-start.el (gnus-get-unread-articles): Protect against groups that come from no known methods. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 9d1571751c1..5f692d626cf 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,7 +1,12 @@ 2010-09-04 Lars Magne Ingebrigtsen + * gnus-start.el (gnus-get-unread-articles): Protect against groups that + come from no known methods. + * pop3.el (pop3-display-message-size-flag): Removed -- everybody wants message sizes. + (pop3-movemail): Use erase-buffer instead of looping and deleting + regions, which seems rather odd. * gnus-agent.el (gnus-agent-load-local): Only read the agent.lib/local file once per `g' run. diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index b111f5caa19..c7d85524ef0 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -1747,18 +1747,19 @@ If SCAN, request a scan of that group as well." infos (nth 2 (car type-cache))) (pop type-cache) - ;; See if any of the groups from this method require updating. - (when (block nil - (dolist (info infos) - (when (<= (gnus-info-level info) - (if (eq method-type 'foreign) - foreign-level - alevel)) - (return t)))) - (gnus-read-active-for-groups method infos) - (dolist (info infos) - (inline (gnus-get-unread-articles-in-group - info (gnus-active (gnus-info-group info))))))) + (when method + ;; See if any of the groups from this method require updating. + (when (block nil + (dolist (info infos) + (when (<= (gnus-info-level info) + (if (eq method-type 'foreign) + foreign-level + alevel)) + (return t)))) + (gnus-read-active-for-groups method infos) + (dolist (info infos) + (inline (gnus-get-unread-articles-in-group + info (gnus-active (gnus-info-group info)))))))) (gnus-message 6 "Checking new news...done"))) (defun gnus-method-rank (type method) diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el index b8f724c918d..8b9ff662781 100644 --- a/lisp/gnus/pop3.el +++ b/lisp/gnus/pop3.el @@ -165,10 +165,7 @@ Shorter values mean quicker response, but are more CPU intensive.") (let ((coding-system-for-write 'binary)) (write-region (point-min) (point-max) crashbox t 'nomesg)) (set-buffer (process-buffer process)) - (while (> (buffer-size) 5000) - (goto-char (point-min)) - (forward-line 50) - (delete-region (point-min) (point)))) + (erase-buffer)) (unless pop3-leave-mail-on-server (pop3-dele process n)) (setq n (+ 1 n))