aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShengHuo ZHU2002-04-12 11:32:23 +0000
committerShengHuo ZHU2002-04-12 11:32:23 +0000
commitae496852a13bdd9bfd3b93b25af7033b840ba954 (patch)
treedea9eedd304b35a9540f66c462908a9e16e3db08
parentb19f34c7d9aa2c5df6417c8c07b12afd66be1a1a (diff)
downloademacs-ae496852a13bdd9bfd3b93b25af7033b840ba954.tar.gz
emacs-ae496852a13bdd9bfd3b93b25af7033b840ba954.zip
* pop3.el (pop3-munge-message-separator): Work if no date.
Trivial patch from Marius Vollmer <mvo@zagadka.ping.de>. * pop3.el (pop3-munge-message-separator): Only use valid date. Trivial patch from Michael Welsh Duggan <md5i@cs.cmu.edu>.
-rw-r--r--lisp/gnus/ChangeLog8
-rw-r--r--lisp/gnus/pop3.el19
2 files changed, 20 insertions, 7 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 39150527270..ff3a35fb97c 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,11 @@
12002-04-12 ShengHuo ZHU <zsh@cs.rochester.edu>
2
3 * pop3.el (pop3-munge-message-separator): Work if no date.
4 Trivial patch from Marius Vollmer <mvo@zagadka.ping.de>.
5
6 * pop3.el (pop3-munge-message-separator): Only use valid date.
7 Trivial patch from Michael Welsh Duggan <md5i@cs.cmu.edu>.
8
12002-04-11 Stefan Monnier <monnier@cs.yale.edu> 92002-04-11 Stefan Monnier <monnier@cs.yale.edu>
2 10
3 * gnus-sum.el (gnus-update-summary-mark-positions) 11 * gnus-sum.el (gnus-update-summary-mark-positions)
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el
index 0a182b47ca7..f00e0daf835 100644
--- a/lisp/gnus/pop3.el
+++ b/lisp/gnus/pop3.el
@@ -1,6 +1,6 @@
1;;; pop3.el --- Post Office Protocol (RFC 1460) interface 1;;; pop3.el --- Post Office Protocol (RFC 1460) interface
2 2
3;; Copyright (C) 1996, 1997, 1998, 1999, 2000 3;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Richard L. Pieri <ratinox@peorth.gweep.net> 6;; Author: Richard L. Pieri <ratinox@peorth.gweep.net>
@@ -244,18 +244,23 @@ If NOW, use that time instead."
244 (looking-at "\001\001\001\001\n") ; MMDF 244 (looking-at "\001\001\001\001\n") ; MMDF
245 (looking-at "BABYL OPTIONS:") ; Babyl 245 (looking-at "BABYL OPTIONS:") ; Babyl
246 )) 246 ))
247 (let ((from (mail-strip-quoted-names (mail-fetch-field "From"))) 247 (let* ((from (mail-strip-quoted-names (mail-fetch-field "From")))
248 (date (split-string (or (mail-fetch-field "Date") 248 (tdate (mail-fetch-field "Date"))
249 (pop3-make-date)) 249 (date (split-string (or (and tdate
250 " ")) 250 (not (string= "" tdate))
251 (From_)) 251 tdate)
252 (pop3-make-date))
253 " "))
254 (From_))
252 ;; sample date formats I have seen 255 ;; sample date formats I have seen
253 ;; Date: Tue, 9 Jul 1996 09:04:21 -0400 (EDT) 256 ;; Date: Tue, 9 Jul 1996 09:04:21 -0400 (EDT)
254 ;; Date: 08 Jul 1996 23:22:24 -0400 257 ;; Date: 08 Jul 1996 23:22:24 -0400
255 ;; should be 258 ;; should be
256 ;; Tue Jul 9 09:04:21 1996 259 ;; Tue Jul 9 09:04:21 1996
257 (setq date 260 (setq date
258 (cond ((string-match "[A-Z]" (nth 0 date)) 261 (cond ((not date)
262 "Tue Jan 1 00:00:0 1900")
263 ((string-match "[A-Z]" (nth 0 date))
259 (format "%s %s %s %s %s" 264 (format "%s %s %s %s %s"
260 (nth 0 date) (nth 2 date) (nth 1 date) 265 (nth 0 date) (nth 2 date) (nth 1 date)
261 (nth 4 date) (nth 3 date))) 266 (nth 4 date) (nth 3 date)))