(nnimap-parse-flags): Simplify the last change.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 15 Mar 2011 16:57:10 +0000 (17:57 +0100)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 15 Mar 2011 16:57:10 +0000 (17:57 +0100)
lisp/ChangeLog
lisp/nnimap.el

index d27e98c..dd1ec97 100644 (file)
@@ -2,6 +2,7 @@
 
        * nnimap.el (nnimap-parse-flags): Remove all MODSEQ entries before
        parsing to avoid integer overflows.
+       (nnimap-parse-flags): Simplify the last change.
 
 2011-03-15  Nelson Ferreira  <nelson.ferreira@ieee.org>  (tiny change)
 
index 36d8c95..1a2bb6f 100644 (file)
@@ -1452,6 +1452,11 @@ textual parts.")
   ;; Change \Delete etc to %Delete, so that the reader can read it.
   (subst-char-in-region (point-min) (point-max)
                        ?\\ ?% t)
+  ;; Remove any MODSEQ entries in the buffer, because they may
+  ;; contain numbers that are too large for 32-bit Emacsen.
+  (while (re-search-forward " MODSEQ ([0-9]+)" nil t)
+    (replace-match "" t t))
+  (goto-char (point-min))
   (let (start end articles groups uidnext elems permanent-flags
              uidvalidity vanished highestmodseq)
     (dolist (elem sequences)
@@ -1505,11 +1510,6 @@ textual parts.")
                (setq start end))
            (setq start (point))
            (goto-char end))
-         ;; Remove any MODSEQ entries in the buffer, because they may
-         ;; contain numbers that are too large for 32-bit Emacsen.
-         (save-excursion
-           (while (re-search-forward " MODSEQ ([0-9]+)" nil t)
-             (replace-match "" t t)))
          (while (re-search-forward "^\\* [0-9]+ FETCH " start t)
            (let ((p (point)))
              (setq elems (read (current-buffer)))