Apply Simon Josefsson <jas@pdc.kth.se>'s patch.
authormorioka <morioka>
Thu, 7 May 1998 06:52:42 +0000 (06:52 +0000)
committermorioka <morioka>
Thu, 7 May 1998 06:52:42 +0000 (06:52 +0000)
mime-view.el

index c4fb8f0..e401ed4 100644 (file)
@@ -1328,9 +1328,8 @@ variable `mime-view-over-to-previous-method-alist'."
   (while (null (get-text-property (point) 'mime-view-entity))
     (backward-char)
     )
-  (let ((point
-        (previous-single-property-change (point) 'mime-view-entity)))
-    (if point
+  (let ((point (previous-single-property-change (point) 'mime-view-entity)))
+    (if (and point (get-text-property (- point 1) 'mime-view-entity))
        (goto-char point)
       (let ((f (assq mime-preview-original-major-mode
                     mime-view-over-to-previous-method-alist)))
@@ -1344,8 +1343,11 @@ variable `mime-view-over-to-previous-method-alist'."
 If there is no previous entity, it calls function registered in
 variable `mime-view-over-to-next-method-alist'."
   (interactive)
+  (while (null (get-text-property (point) 'mime-view-entity))
+    (forward-char)
+    )
   (let ((point (next-single-property-change (point) 'mime-view-entity)))
-    (if point
+    (if (and point (get-text-property point 'mime-view-entity))
        (goto-char point)
       (let ((f (assq mime-preview-original-major-mode
                     mime-view-over-to-next-method-alist)))