Synch with the semi-1_14 branch.
authoryamaoka <yamaoka>
Sun, 27 Oct 2002 23:30:28 +0000 (23:30 +0000)
committeryamaoka <yamaoka>
Sun, 27 Oct 2002 23:30:28 +0000 (23:30 +0000)
ChangeLog
mime-view.el

index 48de0db..6a7a8af 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-10-26  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
+
+       * mime-view.el (mime-preview-find-boundary-info): Fix logic. Do not
+       refer next to next part before examining the next part.
+
 2002-08-28  Katsumi Yamaoka   <yamaoka@jpl.org>
 
        * mime-edit.el (mime-edit-user-agent-value): Add
index aae1f93..5725d8e 100644 (file)
@@ -1464,6 +1464,8 @@ button-2  Move to point under the mouse cursor
 ;;;
 
 (defun mime-preview-find-boundary-info (&optional get-mother)
+  "Return boundary information of current part.
+If GET-MOTHER, refer boundary surrounding current part and its branches."
   (let (entity
        p-beg p-end
        entity-node-id len)
@@ -1490,7 +1492,6 @@ button-2  Move to point under the mouse cursor
           (setq p-end (point-max)))
          (get-mother
           (save-excursion
-            (goto-char p-end)
             (catch 'tag
               (let (e i)
                 (while (setq e
@@ -1498,12 +1499,14 @@ button-2        Move to point under the mouse cursor
                               (point) 'mime-view-entity))
                   (goto-char e)
                   (let ((rc (mime-entity-node-id
-                             (get-text-property (1- (point))
+                             (get-text-property (point)
                                                 'mime-view-entity))))
                     (or (and (>= (setq i (- (length rc) len)) 0)
                              (equal entity-node-id (nthcdr i rc)))
                         (throw 'tag nil)))
-                  (setq p-end e)))
+                  (setq p-end (or (next-single-property-change
+                                   (point) 'mime-view-entity)
+                                  (point-max)))))
               (setq p-end (point-max))))))
     (vector p-beg p-end entity)))