Fix infinite loop that occurs when expunging all messages in folder.
authorChris Hanson <org/chris-hanson/cph>
Tue, 4 Jul 2000 05:12:30 +0000 (05:12 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 4 Jul 2000 05:12:30 +0000 (05:12 +0000)
v7/src/imail/imail-top.scm

index 5a54c134c4232586d03cabe80e4065c4c0ba67cd..f68040b9a1f654baf75422ac37c3476fc64975f3 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: imail-top.scm,v 1.205 2000/06/30 19:12:15 cph Exp $
+;;; $Id: imail-top.scm,v 1.206 2000/07/04 05:12:30 cph Exp $
 ;;;
 ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
 ;;;
@@ -1863,7 +1863,9 @@ Negative argument means search in reverse."
        (begin
          (let ((m (buffer-get buffer 'IMAIL-MESSAGE #f)))
            (cond ((not m)
-                  (select-message folder #f #t))
+                  (let ((m (last-message folder)))
+                    (if m
+                        (select-message folder m #t))))
                  ((not (message-attached? m folder))
                   (select-message folder
                                   (or (first-unseen-message folder)