Add section "Parameters for Sending".
[elisp/wanderlust.git] / wl / wl-message.el
index bdd45fe..1611a37 100644 (file)
@@ -28,6 +28,7 @@
 
 ;;; Code:
 ;;
+(eval-when-compile (require 'cl))
 
 (require 'wl-vars)
 (require 'wl-highlight)
@@ -443,6 +444,9 @@ Returns non-nil if bottom of message."
 (defun wl-message-display-all-header-p (display-type)
   (eq (wl-message-display-type-property display-type :header) 'all))
 
+(defun wl-message-display-no-merge-p (display-type)
+  (eq (wl-message-display-type-property display-type :mime) 'no-merge))
+
 (defun wl-message-buffer-display-type (&optional message-buffer)
   (if message-buffer
       (with-current-buffer message-buffer
@@ -553,19 +557,24 @@ Returns non-nil if bottom of message."
       (setq redisplay t))
     (when (or force-reload redisplay)
       (condition-case err
-         (save-excursion
-           (set-buffer hit)
+         (with-current-buffer hit
            (when (or force-reload
                      (null entity)
                      (not (elmo-mime-entity-display-p
                            entity
                            (if (wl-message-mime-analysis-p display-type)
                                'mime
-                             'as-is))))
+                             'as-is)))
+                     (if (wl-message-display-no-merge-p display-type)
+                         (elmo-mime-entity-reassembled-p entity)
+                       (elmo-mime-entity-fragment-p entity)))
              (setq entity (elmo-message-mime-entity
                            folder
                            number
                            (wl-message-get-original-buffer)
+                           (and wl-message-auto-reassemble-message/partial
+                                (not (wl-message-display-no-merge-p
+                                      display-type)))
                            force-reload
                            unread
                            (not (wl-message-mime-analysis-p display-type)))))