2001-07-18 12:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 18 Jul 2001 19:32:15 +0000 (19:32 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 18 Jul 2001 19:32:15 +0000 (19:32 +0000)
* gnus-sum.el (gnus-summary-import-article): Insert date if
doesn't exist.

lisp/ChangeLog
lisp/gnus-sum.el

index d42fa0f..963fb6b 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-18 12:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-sum.el (gnus-summary-import-article): Insert date if
+       doesn't exist.
+
 2001-07-18 11:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * mml.el (mml-content-type-parameters): New.
index 5668513..61044f4 100644 (file)
@@ -8044,7 +8044,15 @@ latter case, they will be copied into the relevant groups."
       (erase-buffer)
       (nnheader-insert-file-contents file)
       (goto-char (point-min))
-      (unless (nnheader-article-p)
+      (if (nnheader-article-p)
+          (save-restriction
+            (goto-char (point-min))
+            (search-forward "\n\n" nil t)
+            (narrow-to-region (point-min) (1- (point)))
+            (goto-char (point-min))
+            (unless (re-search-forward "^date:" nil t)
+              (goto-char (point-max))
+              (insert "Date: " (message-make-date (nth 5 atts)) "\n")))
        ;; This doesn't look like an article, so we fudge some headers.
        (setq atts (file-attributes file)
              lines (count-lines (point-min) (point-max)))