From: tsuchiya Date: Wed, 6 Sep 2000 05:13:08 +0000 (+0000) Subject: * lisp/nnshimbun.el (nnshimbun-header-xref): New function. X-Git-Tag: t-gnus-6_14_5-05~8 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52c761ce55d08d847fef6ff357b8fe9f0164b49f;p=elisp%2Fgnus.git- * lisp/nnshimbun.el (nnshimbun-header-xref): New function. (nnshimbun-insert-header): Use `nnshimbun-header-xref', instead of `mail-header-xref'. (nnshimbun-make-mhonarc-contents): Took a measure against unexpected TAB characters. --- diff --git a/ChangeLog b/ChangeLog index 9ef5cd4..83bde7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-09-06 TSUCHIYA Masatoshi + + * lisp/nnshimbun.el (nnshimbun-header-xref): New function. + (nnshimbun-insert-header): Use `nnshimbun-header-xref', instead of + `mail-header-xref'. + (nnshimbun-make-mhonarc-contents): Took a measure against + unexpected TAB characters. + 2000-09-05 TSUCHIYA Masatoshi * lisp/nnshimbun.el: Add `netbsd' support. diff --git a/lisp/nnshimbun.el b/lisp/nnshimbun.el index 8df9879..73a3381 100644 --- a/lisp/nnshimbun.el +++ b/lisp/nnshimbun.el @@ -322,6 +322,12 @@ (nnheader-report 'nnml "Couldn't retrieve article: %s" (prin1-to-string article)) nil))) +(defsubst nnshimbun-header-xref (x) + (if (and (setq x (mail-header-xref x)) + (string-match "^Xref: " x)) + (substring x 6) + x)) + (defun nnshimbun-request-article-1 (article &optional group server to-buffer) (if (nnshimbun-backlog (gnus-backlog-request-article @@ -332,7 +338,7 @@ (set-buffer (nnshimbun-open-nov group)) (and (nnheader-find-nov-line article) (nnheader-parse-nov)))) - (let* ((xref (substring (mail-header-xref header) 6)) + (let* ((xref (nnshimbun-header-xref header)) (x-faces (cdr (or (assoc (or server (nnoo-current-server 'nnshimbun)) nnshimbun-x-face-alist) @@ -416,19 +422,18 @@ (insert "Subject: " (or (mime-entity-fetch-field header 'Subject) "(none)") "\n" "From: " (or (mime-entity-fetch-field header 'From) "(nobody)") "\n" "Date: " (or (mail-header-date header) "") "\n" - "Message-ID: " (or (mail-header-id header) (nnmail-message-id)) "\n" - "References: " (or (mail-header-references header) "") "\n" - "Lines: ") - (princ (or (mail-header-lines header) 0) (current-buffer)) - (insert "\n") - (if (mail-header-xref header) - (insert (mail-header-xref header) "\n"))) + "Message-ID: " (or (mail-header-id header) (nnmail-message-id)) "\n") + (let ((refs (mail-header-references header))) + (and refs + (string< "" refs) + (insert "References: " refs "\n"))) + (insert "Lines: " (number-to-string (or (mail-header-lines header) 0)) "\n" + "Xref: " (nnshimbun-header-xref header) "\n")) ;; For pure Gnus. (defun nnshimbun-insert-header (header) (nnheader-insert-header header) (delete-char -1) - (if (mail-header-xref header) - (insert (mail-header-xref header) "\n"))))) + (insert "Xref: " (nnshimbun-header-xref header) "\n")))) (deffoo nnshimbun-retrieve-headers (articles &optional group server fetch-old) (when (nnshimbun-possibly-change-group group server) @@ -562,9 +567,7 @@ (mail-header-set-id header (cdr arg))) (let ((func (intern (concat "mail-header-set-" (symbol-name (car arg)))))) (if (cdr arg) (eval (list func header (cdr arg))))))) - (let ((xref (mail-header-xref header))) - (when (string-match "^Xref: " xref) - (mail-header-set-xref header (substring xref 6)))) + (mail-header-set-xref header (nnshimbun-header-xref header)) (delete-region (point) (progn (forward-line 1) (point))) (nnheader-insert-nov header)))) @@ -808,30 +811,33 @@ is enclosed by at least one regexp grouping construct." (narrow-to-region (point-min) (point)) (nnweb-decode-entities) (goto-char (point-min)) - (while (search-forward "\n" nil t) + (replace-match "\n")) (goto-char (point-min)) - (while (search-forward " -->" nil t) - (replace-match "")) + (while (search-forward "\t" nil t) + (replace-match " ")) (goto-char (point-min)) (let (buf refs) (while (not (eobp)) (cond ((looking-at "