* (nnspool-retrieve-headers): Protect against empty body.
authoryamaoka <yamaoka>
Thu, 14 Jan 1999 00:21:30 +0000 (00:21 +0000)
committeryamaoka <yamaoka>
Thu, 14 Jan 1999 00:21:30 +0000 (00:21 +0000)
lisp/nnspool.el

index dd3d89c..f056344 100644 (file)
@@ -136,9 +136,13 @@ there.")
              (setq beg (point))
              (inline (nnheader-insert-head file))
              (goto-char beg)
-             (search-forward "\n\n" nil t)
-             (forward-char -1)
-             (insert ".\n")
+             (if (search-forward "\n\n" nil t)
+                 (progn (forward-char -1)
+                        (insert ".\n"))
+               (goto-char (point-max))
+               (if (bolp)
+                   (insert ".\n")
+                 (insert "\n.\n")))
              (delete-region (point) (point-max)))
 
            (and do-message