* gnus.el (gnus-revision-number): Increment to 08.
[elisp/gnus.git-] / lisp / nnfolder.el
index c6ad8e5..b2713f4 100644 (file)
@@ -1,5 +1,5 @@
 ;;; nnfolder.el --- mail folder access for Gnus
-;; Copyright (C) 1995,96,97,98 Free Software Foundation, Inc.
+;; Copyright (C) 1995,96,97,98,99 Free Software Foundation, Inc.
 
 ;; Author: Scott Byer <byer@mv.us.adobe.com>
 ;;     Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -300,7 +300,10 @@ time saver for large mailboxes.")
       (set-buffer nnfolder-current-buffer)
       (while (and articles is-old)
        (goto-char (point-min))
-       (when (nnfolder-goto-article (car articles))
+       (when (and (nnfolder-goto-article (car articles))
+                  (search-forward (concat "\n" nnfolder-article-marker)
+                                  nil t))
+         (forward-sexp)
          (if (setq is-old
                    (nnmail-expired-article-p
                     newsgroup
@@ -514,7 +517,8 @@ deleted.  Point is left where the deleted region was."
   (save-restriction
     (narrow-to-region
      (save-excursion
-       (forward-line 1)                        ; in case point is at beginning of message already
+       ;; In case point is at the beginning of the message already.
+       (forward-line 1)
        (nnmail-search-unix-mail-delim-backward)
        (if leave-delim (progn (forward-line 1) (point))
         (point)))
@@ -683,8 +687,8 @@ deleted.  Point is left where the deleted region was."
 
 (defun nnfolder-read-folder (group)
   (let* ((file (nnfolder-group-pathname group))
-        (buffer (set-buffer 
-                 (let ((nnmail-file-coding-system 
+        (buffer (set-buffer
+                 (let ((nnmail-file-coding-system
                         nnfolder-file-coding-system))
                    (nnheader-find-file-noselect file)))))
     (if (equal (cadr (assoc group nnfolder-scantime-alist))
@@ -779,7 +783,8 @@ deleted.  Point is left where the deleted region was."
 
 ;;;###autoload
 (defun nnfolder-generate-active-file ()
-  "Look for mbox folders in the nnfolder directory and make them into groups."
+  "Look for mbox folders in the nnfolder directory and make them into groups.
+This command does not work if you use short group names."
   (interactive)
   (nnmail-activate 'nnfolder)
   (let ((files (directory-files nnfolder-directory))
@@ -804,7 +809,7 @@ deleted.  Point is left where the deleted region was."
 (defun nnfolder-group-pathname (group)
   "Make pathname for GROUP."
   (setq group
-       (mm-encode-coding-string group nnmail-pathname-coding-system))
+       (encode-coding-string group nnmail-pathname-coding-system))
   (let ((dir (file-name-as-directory (expand-file-name nnfolder-directory))))
     ;; If this file exists, we use it directly.
     (if (or nnmail-use-long-file-names