+2004-07-09 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * 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 <jdc@uwo.ca>
* gnus-sum.el (gnus-summary-read-group-1): When summary
;; 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)
(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)))
;;; 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 <larsi@gnus.org>
(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"))
(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)))