Error proof for some special cases.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 14 Dec 1999 00:14:06 +0000 (00:14 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 14 Dec 1999 00:14:06 +0000 (00:14 +0000)
lisp/ChangeLog
lisp/gnus-sum.el
lisp/nnslashdot.el

index fd8aa3e..7d6587f 100644 (file)
@@ -1,3 +1,10 @@
+1999-12-13 18:59:33  Shenghuo ZHU  <zsh@cs.rochester.edu>
+
+       * nnslashdot.el (nnslashdot-date-to-date): Error proof when input
+       is bad.
+       * gnus-sum.el (gnus-list-of-unread-articles): When (car read) 
+       is not 1.
+
 1999-12-13 18:22:08  Shenghuo ZHU  <zsh@cs.rochester.edu>
 
        * nnslashdot.el (nnslashdot-request-article): A space.
index 639314c..60955e4 100644 (file)
@@ -5156,7 +5156,10 @@ displayed, no centering will be performed."
       ;; If the range of read articles is a single range, then the
       ;; first unread article is the article after the last read
       ;; article.  Sounds logical, doesn't it?
-      (if (not (listp (cdr read)))
+      (if (and (not (listp (cdr read)))
+              (or (< (car read) (car active))
+                  (progn (setq read (list read))
+                         nil)))
          (setq first (max (car active) (1+ (cdr read))))
        ;; `read' is a list of ranges.
        (when (/= (setq nlast (or (and (numberp (car read)) (car read))
index 35728b2..32b6fb8 100644 (file)
             (format " *nnslashdot %s*" server))))))
 
 (defun nnslashdot-date-to-date (sdate)
-  (let ((elem (delete "" (split-string sdate))))
-    (concat (substring (nth 0 elem) 0 3) " "
-           (substring (nth 1 elem) 0 3) " "
-           (substring (nth 2 elem) 0 2) " "
-           (substring (nth 3 elem) 1 6) " "
-           (format-time-string "%Y") " "
-           (nth 4 elem))))
+  (condition-case err
+      (let ((elem (delete "" (split-string sdate))))
+       (concat (substring (nth 0 elem) 0 3) " "
+               (substring (nth 1 elem) 0 3) " "
+               (substring (nth 2 elem) 0 2) " "
+               (substring (nth 3 elem) 1 6) " "
+               (format-time-string "%Y") " "
+               (nth 4 elem)))
+    (error "")))
 
 (defun nnslashdot-generate-active ()
   (save-excursion