* gnus-agent.el (gnus-agent-expire-group-1): The check for an unsorted overview buffe...
authorKevin Greiner <kevin.greiner@compsol.cc>
Tue, 23 Oct 2007 04:46:26 +0000 (04:46 +0000)
committerKevin Greiner <kevin.greiner@compsol.cc>
Tue, 23 Oct 2007 04:46:26 +0000 (04:46 +0000)
(gnus-agent-flush-cache): Declared as interactive to make this function easier to use.

lisp/ChangeLog
lisp/gnus-agent.el

index 1d77545..6b7a4fa 100644 (file)
@@ -1,3 +1,10 @@
+2007-10-22  Kevin Greiner  <kevin.greiner@compsol.cc>
+
+       * gnus-agent.el (gnus-agent-expire-group-1): The check for an unsorted
+       overview buffer needed a catch to receive its throw.
+       (gnus-agent-flush-cache): Declared as interactive to make this function
+       easier to use.
+
 2007-10-20  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * html2text.el (html2text-fix-paragraph): Use `forward-line' instead of
index 4417e88..9236041 100644 (file)
@@ -1825,6 +1825,7 @@ appears to have any local content.  The actual content, the
 article files, is then deleted using gnus-agent-expire-group. The
 gnus-agent-regenerate-group method provides an undo mechanism by
 reconstructing the index files from the article files."
+  (interactive)
   (save-excursion
     (let ((file-name-coding-system nnmail-pathname-coding-system))
       (while gnus-agent-buffer-alist
@@ -3333,16 +3334,17 @@ line." (point) nov-file)))
         ;; Check the order of the entry positions.  They should be in
         ;; ascending order.  If they aren't, the positions must be
         ;; converted to markers.
-        (when (let ((dlist dlist)
-                    (prev-pos -1)
-                    pos)
-                (while dlist
-                  (if (setq pos (nth 3 (pop dlist)))
-                      (if (< pos prev-pos)
-                          (throw 'sort-results 'unsorted)
-                        (setq prev-pos pos)))))
+        (when (catch 'sort-results
+                (let ((dlist dlist)
+                      (prev-pos -1)
+                      pos)
+                  (while dlist
+                    (if (setq pos (nth 3 (pop dlist)))
+                        (if (< pos prev-pos)
+                            (throw 'sort-results 'unsorted)
+                          (setq prev-pos pos))))))
           (gnus-message 7 "gnus-agent-expire: Unsorted overview; inserting markers to compensate.")
-          (mapcar (lambda (entry)
+          (mapc (lambda (entry)
                     (let ((pos (nth 3 entry)))
                       (if pos
                           (setf (nth 3 entry)