From f5b726b0b6e9c47dc764f35ebe09c7a2a403410d Mon Sep 17 00:00:00 2001 From: tsuchiya Date: Sat, 19 Aug 2000 07:27:32 +0000 Subject: [PATCH] Change for ZDNet. --- ChangeLog | 6 ++++++ lisp/nnshimbun.el | 18 +++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9adbdc6..632a5c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-08-19 TSUCHIYA Masatoshi + + * nnshimbun.el (nnshimbun-type-definition): Follow changes of ZDNet. + (nnshimbun-make-text-or-html-contents): Ditto. + (nnshimbun-make-html-contents): Ditto. + 2000-08-18 TSUCHIYA Masatoshi Akihiro Arisawa diff --git a/lisp/nnshimbun.el b/lisp/nnshimbun.el index 3ca4016..be376c6 100644 --- a/lisp/nnshimbun.el +++ b/lisp/nnshimbun.el @@ -122,8 +122,8 @@ (index-url . nnshimbun-url) (from-address . "zdnn@softbank.co.jp") (make-contents . nnshimbun-make-html-contents) - (contents-start . "") - (contents-end . "")) + (contents-start . "\\(\\|[0-9]+年[0-9]+月[0-9]+日[^<]*[ \t\r\f\n]*[ \t\r\f\n]*[ \t\r\f\n]*\\(

\\)?\\)") + (contents-end . "\\(\\|
\\|<\\(b\\|strong\\)>\\[[^<]*<\\2>ZDNet/\\(JAPAN\\|USA\\)\\]\\(<[^>]+>\\)?\\)")) ("mew" (url . "http://www.mew.org/archive/") (groups ,@(mapcar #'car nnshimbun-mew-groups)) @@ -748,11 +748,11 @@ is enclosed by at least one regexp grouping construct." (defun nnshimbun-make-text-or-html-contents (header &optional x-face) (let ((case-fold-search t) (html t) (start)) - (when (and (search-forward nnshimbun-contents-start nil t) + (when (and (re-search-forward nnshimbun-contents-start nil t) (setq start (point)) - (search-forward nnshimbun-contents-end nil t)) + (re-search-forward nnshimbun-contents-end nil t)) + (delete-region (match-beginning 0) (point-max)) (delete-region (point-min) start) - (delete-region (- (point) (length nnshimbun-contents-end)) (point-max)) (nnshimbun-shallow-rendering) (setq html nil)) (goto-char (point-min)) @@ -769,11 +769,11 @@ is enclosed by at least one regexp grouping construct." (defun nnshimbun-make-html-contents (header &optional x-face) (let (start) - (when (and (search-forward nnshimbun-contents-start nil t) + (when (and (re-search-forward nnshimbun-contents-start nil t) (setq start (point)) - (search-forward nnshimbun-contents-end nil t)) - (delete-region (point-min) start) - (delete-region (- (point) (length nnshimbun-contents-end)) (point-max))) + (re-search-forward nnshimbun-contents-end nil t)) + (delete-region (match-beginning 0) (point-max)) + (delete-region (point-min) start)) (goto-char (point-min)) (nnshimbun-insert-header header) (insert "Content-Type: text/html; charset=ISO-2022-JP\n" -- 1.7.10.4