From: ShengHuo ZHU Date: Mon, 18 Feb 2002 13:38:08 +0000 (+0000) Subject: * mm-decode.el (mm-dissect-buffer): Add loose-mime parameter. X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=97f8bfe6ab6947b1871846214ac1361dd3648773;p=gnus * mm-decode.el (mm-dissect-buffer): Add loose-mime parameter. * gnus-art.el (gnus-display-mime): Use it. * mm-partial.el (mm-partial-find-parts): Use it. * gnus-sum.el (gnus-article-loose-mime): Rename from gnus-article-no-strict-mime. (gnus-summary-save-parts): Use it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37c51bcff..af5685b71 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2002-02-18 ShengHuo ZHU + + * mm-decode.el (mm-dissect-buffer): Add loose-mime parameter. + + * gnus-art.el (gnus-display-mime): Use it. + + * mm-partial.el (mm-partial-find-parts): Use it. + + * gnus-sum.el (gnus-article-loose-mime): Rename from + gnus-article-no-strict-mime. + (gnus-summary-save-parts): Use it. + 2002-02-18 Katsumi Yamaoka * gnus-fun.el (gnus-convert-gray-x-face-to-xpm): Remove unused diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index a2eff2c3f..72909f11a 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -4136,8 +4136,8 @@ If no internal viewer is available, use an external viewer." ;; We have to do this since selecting the window ;; may change the point. So we set the window point. (set-window-point window point))) - (let* ((handles (or ihandles (mm-dissect-buffer - gnus-article-no-strict-mime) + (let* ((handles (or ihandles (mm-dissect-buffer + nil gnus-article-loose-mime) (mm-uu-dissect))) buffer-read-only handle name type b e display) (when (and (not ihandles) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 77cbbc94a..4d2cdeb73 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1017,8 +1017,8 @@ that were fetched. Say, for nnultimate groups." :group 'gnus-summary :type 'string) -(defcustom gnus-article-no-strict-mime nil - "If non-nil, don't require strict MIME. +(defcustom gnus-article-loose-mime nil + "If non-nil, don't require MIME-Version header. Some brain-damaged MUA/MTA, e.g. Lotus Domino 5.0.6 clients, does not supply the MIME-Version header or deliberately strip it From the mail. Set it to non-nil, Gnus will treat some articles as MIME even if @@ -10322,8 +10322,7 @@ If REVERSE, save parts that do not match TYPE." (save-excursion (set-buffer gnus-article-buffer) (let ((handles (or gnus-article-mime-handles - (mm-dissect-buffer - gnus-article-no-strict-mime) + (mm-dissect-buffer nil gnus-article-loose-mime) (mm-uu-dissect)))) (when handles (gnus-summary-save-parts-1 type dir handles reverse) diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index b2b439b52..57c6268a1 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -454,13 +454,14 @@ for types in mm-keep-viewer-alive-types." (message "Destroying external MIME viewers") (mm-destroy-parts mm-postponed-undisplay-list))) -(defun mm-dissect-buffer (&optional no-strict-mime) +(defun mm-dissect-buffer (&optional no-strict-mime loose-mime) "Dissect the current buffer and return a list of MIME handles." (save-excursion (let (ct ctl type subtype cte cd description id result from) (save-restriction (mail-narrow-to-head) (when (or no-strict-mime + loose-mime (mail-fetch-field "mime-version")) (setq ct (mail-fetch-field "content-type") ctl (ignore-errors (mail-header-parse-content-type ct)) diff --git a/lisp/mm-partial.el b/lisp/mm-partial.el index 086762f2f..55bc4cf56 100644 --- a/lisp/mm-partial.el +++ b/lisp/mm-partial.el @@ -43,7 +43,7 @@ gnus-newsgroup-name) (when (search-forward id nil t) (let ((nhandles (mm-dissect-buffer - gnus-article-no-strict-mime)) nid) + nil gnus-article-loose-mime)) nid) (if (consp (car nhandles)) (mm-destroy-parts nhandles) (setq nid (cdr (assq 'id