(article-begin . "^\\\\\\\\\n")
(head-begin . "^Paper.*:")
(head-end . "\\(^\\\\\\\\.*\n\\|-----------------\\)")
- (body-begin . "")
- (body-end . "-------------------------------------------------")
+ (body-begin . "")
+ (body-end . "-------------------------------------------------")
(file-end . "^Title: Recent Seminal")
(generate-head-function . nndoc-generate-lanl-gov-head)
(article-transform-function . nndoc-transform-lanl-gov-announce)
(defvoo nndoc-prepare-body-function nil)
(defvoo nndoc-generate-head-function nil)
(defvoo nndoc-article-transform-function nil)
+(defvoo nndoc-article-begin-function nil)
(defvoo nndoc-status-string "")
(defvoo nndoc-group-alist nil)
(insert-buffer-substring
nndoc-current-buffer (car entry) (nth 1 entry)))
(goto-char (point-max))
- (or (= (char-after (1- (point))) ?\n) (insert "\n"))
+ (unless (= (char-after (1- (point))) ?\n)
+ (insert "\n"))
(insert (format "Lines: %d\n" (nth 4 entry)))
(insert ".\n")))
t))
(defun nndoc-mbox-article-begin ()
- (when (re-search-forward (concat "^" message-unix-mail-delimiter))
+ (when (re-search-forward (concat "^" message-unix-mail-delimiter) nil t)
(goto-char (match-beginning 0))))
(defun nndoc-mbox-body-end ()
len end)
(when
(save-excursion
- (and (re-search-backward nndoc-article-begin nil t)
+ (and (re-search-backward
+ (concat "^" message-unix-mail-delimiter) nil t)
(setq end (point))
(search-forward "\n\n" beg t)
(re-search-backward
"^Content-Length:[ \t]*\\([0-9]+\\) *$" end t)
(setq len (string-to-int (match-string 1)))
(search-forward "\n\n" beg t)
- (or (= (setq len (+ (point) len)) (point-max))
- (and (< len (point-max))
- (goto-char len)
- (looking-at nndoc-article-begin)))))
+ (unless (= (setq len (+ (point) len)) (point-max))
+ (and (< len (point-max))
+ (goto-char len)
+ (looking-at message-unix-mail-delimiter)))))
(goto-char len))))
(defun nndoc-mmdf-type-p ()
;; Go through the file.
(while (if (and first nndoc-first-article)
(nndoc-search nndoc-first-article)
- (condition-case ()
- (nndoc-search nndoc-article-begin)
- (error nil)))
+ (nndoc-article-begin))
(setq first nil)
(cond (nndoc-head-begin-function
(funcall nndoc-head-begin-function))
(funcall nndoc-body-end-function))
(and nndoc-body-end
(nndoc-search nndoc-body-end))
- (condition-case ()
- (nndoc-search nndoc-article-begin)
- (error nil))
+ (nndoc-article-begin)
(progn
(goto-char (point-max))
(when nndoc-file-end
(count-lines body-begin body-end))
nndoc-dissection-alist))))))
+(defun nndoc-article-begin ()
+ (if nndoc-article-begin-function
+ (funcall nndoc-article-begin-function)
+ (condition-case ()
+ (nndoc-search nndoc-article-begin)
+ (error nil))))
+
(defun nndoc-unquote-dashes ()
"Unquote quoted non-separators in digests."
(while (re-search-forward "^- -"nil t)