2004-10-06 Katsumi Yamaoka <yamaoka@jpl.org>
+ * 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.
;; 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.
(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)))
(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)))
;;; 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 <zsh@cs.rochester.edu>
;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp
'("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)
(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