From 66c26c155163db358a8641e5165b0439f95e7133 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 6 Oct 2004 07:49:30 +0000 Subject: [PATCH] Synch to No Gnus 200410060748. --- lisp/ChangeLog | 11 +++++++++++ lisp/gnus-art.el | 14 +++++++++----- lisp/gnus-sum.el | 1 - lisp/mm-decode.el | 6 +----- lisp/mm-uu.el | 25 ++++++++++++++++++++++--- 5 files changed, 43 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c29b711..a223e99 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,16 @@ 2004-10-06 Katsumi Yamaoka + * mm-uu.el (mm-uu-dissect): Allow optional arg. + (mm-uu-dissect-text-parts): New function. + + * gnus-art.el (gnus-display-mime): Use mm-uu-dissect-text-parts to + dissect text parts. + + * gnus-sum.el (gnus-summary-force-verify-and-decrypt): Revert + 2004-08-18 change. + + * mm-decode.el (mm-dissect-singlepart): Revert 2004-08-18 change. + * gnus-topic.el (gnus-topic-hierarchical-parameters): Use gnus-current-topics instead of gnus-current-topic. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index dffa6f3..547218a 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -4908,11 +4908,15 @@ N is the numerical prefix." ;; 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 nil gnus-article-loose-mime) - (and gnus-article-emulate-mime - (mm-uu-dissect)))) - (inhibit-read-only t) handle name type b e display) + (let ((handles ihandles) + (inhibit-read-only t) + handle name type b e display) + (cond (handles) + ((setq handles (mm-dissect-buffer nil gnus-article-loose-mime)) + (when gnus-article-emulate-mime + (mm-uu-dissect-text-parts handles))) + (gnus-article-emulate-mime + (setq handles (mm-uu-dissect)))) (when (and (not ihandles) (not gnus-displaying-mime)) ;; Top-level call; we clean up. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 7341eb3..bb37b0b 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -7171,7 +7171,6 @@ be displayed." (let ((mm-verify-option 'known) (mm-decrypt-option 'known) (gnus-article-emulate-mime t) - (mm-fill-flowed nil) (gnus-buttonized-mime-types (append (list "multipart/signed" "multipart/encrypted") gnus-buttonized-mime-types))) diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index a06bd4b..49fc7e1 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -579,11 +579,7 @@ Postpone undisplaying of viewers for types in (defun mm-dissect-singlepart (ctl cte &optional force cdl description id) (when (or force (if (equal "text/plain" (car ctl)) - ;; FIXME: This is a kludge. Proper fix is to make - ;; gnus-display-mime invoke mm-uu-dissect on all - ;; textual MIME parts, and stop using mm-fill-flowed - ;; here. - (and mm-fill-flowed (assoc 'format ctl)) + (assoc 'format ctl) t)) (mm-make-handle (mm-copy-to-buffer) ctl cte nil cdl description nil id))) diff --git a/lisp/mm-uu.el b/lisp/mm-uu.el index 269a787..1bdebde 100644 --- a/lisp/mm-uu.el +++ b/lisp/mm-uu.el @@ -1,5 +1,6 @@ ;;; mm-uu.el --- Return uu stuff as mm handles -;; Copyright (c) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Free Software Foundation, Inc. ;; Author: Shenghuo Zhu ;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp @@ -430,14 +431,16 @@ Return that buffer." '("application/pgp-keys")))) ;;;###autoload -(defun mm-uu-dissect () - "Dissect the current buffer and return a list of uu handles." +(defun mm-uu-dissect (&optional noheader) + "Dissect the current buffer and return a list of uu handles. +The optional NOHEADER means there's no header in the buffer." (let ((case-fold-search t) text-start start-point end-point file-name result text-plain-type entry func) (save-excursion (goto-char (point-min)) (cond + (noheader) ((looking-at "\n") (forward-line)) ((search-forward "\n\n" nil t) @@ -493,6 +496,22 @@ Return that buffer." (setq result (cons "multipart/mixed" (nreverse result)))) result))) +(defun mm-uu-dissect-text-parts (handle) + "Dissect text parts and put uu handles into HANDLE." + (let ((buffer (mm-handle-buffer handle)) + children) + (cond ((stringp buffer) + (mapc 'mm-uu-dissect-text-parts (cdr handle))) + ((bufferp buffer) + (when (and (equal "text/plain" (mm-handle-media-type handle)) + (with-current-buffer buffer + (setq children (mm-uu-dissect t)))) + (kill-buffer buffer) + (setcar handle (car children)) + (setcdr handle (cdr children)))) + (t + (mapc 'mm-uu-dissect-text-parts handle))))) + (provide 'mm-uu) ;;; mm-uu.el ends here -- 1.7.10.4