* elmo-pop3.el (elmo-pop3-sort-overview-by-original-number):
authorteranisi <teranisi>
Fri, 19 Jan 2001 01:39:44 +0000 (01:39 +0000)
committerteranisi <teranisi>
Fri, 19 Jan 2001 01:39:44 +0000 (01:39 +0000)
 Fixed problem when `elmo-pop3-use-uidl' is nil.
 (Reported by Takenobu Sugiyama <sugiyama@ae.advantest.co.jp>)

elmo/ChangeLog
elmo/elmo-pop3.el

index 38d1494..8ada519 100644 (file)
@@ -1,3 +1,9 @@
+2001-01-19  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo-pop3.el (elmo-pop3-sort-overview-by-original-number):
+       Fixed problem when `elmo-pop3-use-uidl' is nil.
+       (Reported by Takenobu Sugiyama <sugiyama@ae.advantest.co.jp>)
+
 2001-01-18  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * elmo-version.el (elmo-version): Up to 2.4.1.
index d2c18de..13ac92b 100644 (file)
 (defalias 'elmo-pop3-msgdb-create 'elmo-pop3-msgdb-create-as-numlist)
 
 (defun elmo-pop3-sort-overview-by-original-number (overview loc-alist)
-  (sort overview
-       (lambda (ent1 ent2)
-         (< (elmo-pop3-uidl-to-number
-             (cdr (assq (elmo-msgdb-overview-entity-get-number ent1)
-                        loc-alist)))
-            (elmo-pop3-uidl-to-number
-             (cdr (assq (elmo-msgdb-overview-entity-get-number ent2)
-                        loc-alist)))))))
+  (if loc-alist
+      (sort overview
+           (lambda (ent1 ent2)
+             (< (elmo-pop3-uidl-to-number
+                 (cdr (assq (elmo-msgdb-overview-entity-get-number ent1)
+                            loc-alist)))
+                (elmo-pop3-uidl-to-number
+                 (cdr (assq (elmo-msgdb-overview-entity-get-number ent2)
+                            loc-alist))))))
+    overview))
 
 (defun elmo-pop3-sort-msgdb-by-original-number (msgdb)
   (message "Sorting...")