From: yamaoka Date: Fri, 9 Jul 2004 09:46:10 +0000 (+0000) Subject: Synch to No Gnus 200407090945. X-Git-Tag: t-gnus-6_17_4-quimby-~827 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8eae38baed28cfd2e46fec0a7a3574304ab126da;p=elisp%2Fgnus.git- Synch to No Gnus 200407090945. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8130310..55c58ee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2004-07-09 Katsumi Yamaoka + + * nndoc.el (nndoc-type-alist): Improve regexp for article-begin, + add generate-head-function and generate-article-function to the + rfc822-forward entry. + (nndoc-rfc822-forward-generate-article): New function. + (nndoc-rfc822-forward-generate-head): New function. + + * mm-decode.el (mm-dissect-buffer): Simplify cleaning of CTE. + 2004-07-06 Dan Christensen * gnus-sum.el (gnus-summary-read-group-1): When summary diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index de879ca..8c0f413 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -522,15 +522,11 @@ Postpone undisplaying of viewers for types in ;; solution, avoids most of them. (if from (setq from (cadr (mail-extract-address-components from)))))) - (when cte - (setq cte (mail-header-strip cte))) (if (or (not ctl) (not (string-match "/" (car ctl)))) (mm-dissect-singlepart (list mm-dissect-default-type) - (and cte (intern (downcase (mail-header-remove-whitespace - (mail-header-remove-comments - cte))))) + (and cte (intern (downcase (mail-header-strip cte)))) no-strict-mime (and cd (ignore-errors (mail-header-parse-content-disposition cd))) description) @@ -563,9 +559,7 @@ Postpone undisplaying of viewers for types in (mm-possibly-verify-or-decrypt (mm-dissect-singlepart ctl - (and cte (intern (downcase (mail-header-remove-whitespace - (mail-header-remove-comments - cte))))) + (and cte (intern (downcase (mail-header-strip cte)))) no-strict-mime (and cd (ignore-errors (mail-header-parse-content-disposition cd))) diff --git a/lisp/nndoc.el b/lisp/nndoc.el index 6a09175..d6a9e0e 100644 --- a/lisp/nndoc.el +++ b/lisp/nndoc.el @@ -1,5 +1,5 @@ ;;; nndoc.el --- single file access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -130,8 +130,10 @@ from the document.") (article-transform-function . nndoc-transform-lanl-gov-announce) (subtype preprints guess)) (rfc822-forward - (article-begin . "^\n") - (body-end-function . nndoc-rfc822-forward-body-end-function)) + (article-begin . "^\n\n*") + (body-end-function . nndoc-rfc822-forward-body-end-function) + (generate-head-function . nndoc-rfc822-forward-generate-head) + (generate-article-function . nndoc-rfc822-forward-generate-article)) (outlook (article-begin-function . nndoc-outlook-article-begin) (body-end . "\0")) @@ -492,6 +494,29 @@ from the document.") (defun nndoc-rfc822-forward-body-end-function () (goto-char (point-max))) +(defun nndoc-rfc822-forward-generate-article (article &optional head) + (let ((entry (cdr (assq article nndoc-dissection-alist))) + (begin (point)) + encoding) + (with-current-buffer nndoc-current-buffer + (save-restriction + (message-narrow-to-head) + (setq encoding (message-fetch-field "content-transfer-encoding")))) + (insert-buffer-substring nndoc-current-buffer (car entry) (nth 3 entry)) + (when encoding + (save-restriction + (narrow-to-region begin (point-max)) + (mm-decode-content-transfer-encoding + (intern (downcase (mail-header-strip encoding)))))) + (when head + (goto-char begin) + (when (search-forward "\n\n" nil t) + (delete-region (1- (point)) (point-max))))) + t) + +(defun nndoc-rfc822-forward-generate-head (article) + (nndoc-rfc822-forward-generate-article article 'head)) + (defun nndoc-mime-parts-type-p () (let ((case-fold-search t) (limit (search-forward "\n\n" nil t)))