Commit e1e36689 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

1996-08-29 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>

	* nndoc.el (nndoc-mbox-article-begin): New function.
	(nndoc-type-alist): Enter it into definition.
	(nndoc-dissect-buffer): Use new definition.
parent cba446dd
......@@ -53,11 +53,8 @@ One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
(article-begin . "^#! *rnews +\\([0-9]+\\) *\n")
(body-end-function . nndoc-rnews-body-end))
(mbox
(article-begin .
,(let ((delim (concat "^" message-unix-mail-delimiter)))
(if (string-match "\n\\'" delim)
(substring delim 0 (match-beginning 0))
delim)))
(article-begin . "^From \\([^ \n]*\\(\\|\".*\"[^ \n]*\\)\\) ?\\([^ \n]*\\) *\\([^ ]*\\) *\\([0-9]*\\) *\\([0-9:]*\\) *\\([A-Z]?[A-Z]?[A-Z][A-Z]\\( DST\\)?\\|[-+]?[0-9][0-9][0-9][0-9]\\|\\) * [0-9][0-9]\\([0-9]*\\) *\\([A-Z]?[A-Z]?[A-Z][A-Z]\\( DST\\)?\\|[-+]?[0-9][0-9][0-9][0-9]\\|\\) *\\(remote from .*\\)?\n")
(article-begin-function . nndoc-mbox-article-begin)
(body-end-function . nndoc-mbox-body-end))
(babyl
(article-begin . "\^_\^L *\n")
......@@ -107,6 +104,7 @@ One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
(defvoo nndoc-first-article nil)
(defvoo nndoc-article-end nil)
(defvoo nndoc-article-begin nil)
(defvoo nndoc-article-begin-function nil)
(defvoo nndoc-head-begin nil)
(defvoo nndoc-head-end nil)
(defvoo nndoc-file-end nil)
......@@ -338,7 +336,7 @@ One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
nndoc-body-begin nndoc-body-end-function nndoc-body-end
nndoc-prepare-body nndoc-article-transform
nndoc-generate-head nndoc-body-begin-function
nndoc-head-begin-function)))
nndoc-head-begin-function nndoc-article-begin-function)))
(while vars
(set (pop vars) nil)))
(let* (defs guess)
......@@ -371,7 +369,9 @@ One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
;; Go through the file.
(while (if (and first nndoc-first-article)
(nndoc-search nndoc-first-article)
(nndoc-search nndoc-article-begin))
(if nndoc-article-begin-function
(funcall nndoc-article-begin-function)
(nndoc-search nndoc-article-begin)))
(setq first nil)
(cond (nndoc-head-begin-function
(funcall nndoc-head-begin-function))
......@@ -391,7 +391,9 @@ One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
(funcall nndoc-body-end-function))
(and nndoc-body-end
(nndoc-search nndoc-body-end))
(nndoc-search nndoc-article-begin)
(if nndoc-article-begin-function
(funcall nndoc-article-begin-function)
(nndoc-search nndoc-article-begin))
(progn
(goto-char (point-max))
(when nndoc-file-end
......@@ -411,6 +413,10 @@ One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
(and (re-search-forward nndoc-article-begin nil t)
(goto-char (match-beginning 0))))
(defun nndoc-mbox-article-begin ()
(when (re-search-forward nndoc-article-begin nil t)
(goto-char (match-beginning 0))))
(defun nndoc-mbox-body-end ()
(let ((beg (point))
len end)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment