comparison lisp/gnus/nnfolder.el @ 38:1a767b41a199 r19-15b102

Import from CVS: tag r19-15b102
author cvs
date Mon, 13 Aug 2007 08:54:01 +0200
parents c53a95d3c46d
children 8b8b7f3559a2
comparison
equal deleted inserted replaced
37:ad40ac360d14 38:1a767b41a199
373 (goto-char (point-min)) 373 (goto-char (point-min))
374 (search-forward "\n\n" nil t) 374 (search-forward "\n\n" nil t)
375 (forward-line -1) 375 (forward-line -1)
376 (while (re-search-backward (concat "^" nnfolder-article-marker) nil t) 376 (while (re-search-backward (concat "^" nnfolder-article-marker) nil t)
377 (delete-region (point) (progn (forward-line 1) (point)))) 377 (delete-region (point) (progn (forward-line 1) (point))))
378 (when nnmail-cache-accepted-message-ids
379 (nnmail-cache-insert (nnmail-fetch-field "message-id")))
378 (setq result 380 (setq result
379 (car (nnfolder-save-mail 381 (car (nnfolder-save-mail
380 (if (stringp group) 382 (if (stringp group)
381 (list (cons group (nnfolder-active-number group))) 383 (list (cons group (nnfolder-active-number group)))
382 (setq art-group 384 (setq art-group
383 (nnmail-article-group 'nnfolder-active-number))))))) 385 (nnmail-article-group 'nnfolder-active-number)))))))
384 (when last 386 (when last
385 (save-excursion 387 (save-excursion
386 (nnfolder-possibly-change-folder (or (caar art-group) group)) 388 (nnfolder-possibly-change-folder (or (caar art-group) group))
387 (nnfolder-save-buffer)))) 389 (nnfolder-save-buffer)
390 (when nnmail-cache-accepted-message-ids
391 (nnmail-cache-close)))))
388 (nnmail-save-active nnfolder-group-alist nnfolder-active-file) 392 (nnmail-save-active nnfolder-group-alist nnfolder-active-file)
389 (unless result 393 (unless result
390 (nnheader-report 'nnfolder "Couldn't store article")) 394 (nnheader-report 'nnfolder "Couldn't store article"))
391 result)) 395 result))
392 396
641 (nnmail-activate 'nnfolder) 645 (nnmail-activate 'nnfolder)
642 ;; Read in the file. 646 ;; Read in the file.
643 (let ((delim (concat "^" message-unix-mail-delimiter)) 647 (let ((delim (concat "^" message-unix-mail-delimiter))
644 (marker (concat "\n" nnfolder-article-marker)) 648 (marker (concat "\n" nnfolder-article-marker))
645 (number "[0-9]+") 649 (number "[0-9]+")
646 (active (cadr (assoc group nnfolder-group-alist))) 650 (active (or (cadr (assoc group nnfolder-group-alist))
651 (cons 1 0)))
647 (scantime (assoc group nnfolder-scantime-alist)) 652 (scantime (assoc group nnfolder-scantime-alist))
648 (minid (lsh -1 -1)) 653 (minid (lsh -1 -1))
649 maxid start end newscantime 654 maxid start end newscantime
650 buffer-read-only) 655 buffer-read-only)
651 (buffer-disable-undo (current-buffer)) 656 (buffer-disable-undo (current-buffer))
674 ;; marker. Find the start of that message, and begin to search for 679 ;; marker. Find the start of that message, and begin to search for
675 ;; unmarked messages from there. 680 ;; unmarked messages from there.
676 (when (not (or nnfolder-distrust-mbox 681 (when (not (or nnfolder-distrust-mbox
677 (< maxid 2))) 682 (< maxid 2)))
678 (goto-char (point-max)) 683 (goto-char (point-max))
679 (if (not (re-search-backward marker nil t)) 684 (unless (re-search-backward marker nil t)
680 (goto-char (point-min)) 685 (goto-char (point-min))))
681 (when (not (nnmail-search-unix-mail-delim))
682 (goto-char (point-min)))))
683 686
684 ;; Keep track of the active number on our own, and insert it back 687 ;; Keep track of the active number on our own, and insert it back
685 ;; into the active list when we're done. Also, prime the pump to 688 ;; into the active list when we're done. Also, prime the pump to
686 ;; cut down on the number of searches we do. 689 ;; cut down on the number of searches we do.
687 (unless (nnmail-search-unix-mail-delim) 690 (unless (nnmail-search-unix-mail-delim)