;;; Commentary:
-;; For an overview of what the interface functions do, please see the
-;; Gnus sources.
-
-;; Various enhancements by byer@mv.us.adobe.com (Scott Byer).
-
;;; Code:
(require 'nnheader)
(require 'message)
(require 'nnmail)
(require 'nnoo)
-(eval-when-compile (require 'cl))
+(require 'cl)
+(require 'gnus-util)
(nnoo-declare nnfolder)
(save-excursion
(set-buffer nntp-server-buffer)
(erase-buffer)
- (let ((delim-string (concat "^" message-unix-mail-delimiter))
- article art-string start stop)
+ (let (article art-string start stop)
(nnfolder-possibly-change-group group server)
(when nnfolder-current-buffer
(set-buffer nnfolder-current-buffer)
;; backwards will be faster. Especially if we're at the
;; beginning of the buffer :-). -SLB
(search-backward art-string nil t))
- (setq start (or (re-search-backward delim-string nil t)
- (point)))
+ (nnmail-search-unix-mail-delim)
+ (setq start (point))
(search-forward "\n\n" nil t)
(setq stop (1- (point)))
(set-buffer nntp-server-buffer)
(goto-char (point-min))
(when (search-forward (nnfolder-article-string article) nil t)
(let (start stop)
- (re-search-backward (concat "^" message-unix-mail-delimiter) nil t)
+ (nnmail-search-unix-mail-delim)
(setq start (point))
(forward-line 1)
- (unless (and (re-search-forward
- (concat "^" message-unix-mail-delimiter) nil t)
+ (unless (and (nnmail-search-unix-mail-delim)
(forward-line -1))
(goto-char (point-max)))
(setq stop (point))
(save-excursion
(delete-region
(save-excursion
- (re-search-backward (concat "^" message-unix-mail-delimiter) nil t)
+ (nnmail-search-unix-mail-delim)
(if leave-delim (progn (forward-line 1) (point))
(match-beginning 0)))
(progn
(forward-line 1)
- (if (re-search-forward (concat "^" message-unix-mail-delimiter) nil t)
+ (if (nnmail-search-unix-mail-delim)
(if (and (not (bobp)) leave-delim)
(progn (forward-line -2) (point))
(match-beginning 0))
(when (looking-at (concat ">" message-unix-mail-delimiter))
(delete-char 1))
;; This might come from somewhere else.
- (unless (looking-at delim)
+ (unless (looking-at message-unix-mail-delimiter)
(insert "From nobody " (current-time-string) "\n")
(goto-char (point-min)))
;; Quote all "From " lines in the article.
(goto-char (point-max))
(if (not (re-search-backward marker nil t))
(goto-char (point-min))
- (when (not (re-search-backward delim nil t))
+ (when (not (nnmail-search-unix-mail-delim))
(goto-char (point-min)))))
;; Keep track of the active number on our own, and insert it back
;; into the active list when we're done. Also, prime the pump to
;; cut down on the number of searches we do.
(setq end (point-marker))
- (set-marker end (or (and (re-search-forward delim nil t)
- (match-beginning 0))
+ (set-marker end (or (and (nnmail-search-unix-mail-delim)
+ (point))
(point-max)))
(while (not (= end (point-max)))
(setq start (marker-position end))
;; them.
(while (looking-at delim)
(forward-line 1))
- (set-marker end (or (and (re-search-forward delim nil t)
- (match-beginning 0))
+ (set-marker end (or (and (nnmail-search-unix-mail-delim)
+ (point))
(point-max)))
(goto-char start)
(when (not (search-forward marker end t))