(mime-preview-move-to-next): Attempt to go to the next page if the return
authoryamaoka <yamaoka>
Mon, 4 Oct 1999 12:50:42 +0000 (12:50 +0000)
committeryamaoka <yamaoka>
Mon, 4 Oct 1999 12:50:42 +0000 (12:50 +0000)
value of `next-single-property-change' is greater than `point-max'.
(mime-preview-move-to-previous): Don't move backward at the beginning of
the buffer; attempt to go to the previous page if the return value of
`previous-single-property-change' is less than `point-min'.

ChangeLog
mime-view.el

index 4158bbd..234ad2c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+1999-10-04  Katsumi Yamaoka   <yamaoka@jpl.org>
+
+       * mime-view.el (mime-preview-move-to-next): Attempt to go to the
+       next page if the return value of `next-single-property-change' is
+       greater than `point-max'.
+       (mime-preview-move-to-previous): Don't move backward at the
+       beginning of the buffer; attempt to go to the previous page if the
+       return value of `previous-single-property-change' is less than
+       `point-min'.
+
 1999-09-29  MORIOKA Tomohiko  <tomo@m17n.org>
 
        * mime-view.el (mime-display-multipart/mixed): Share cell of
index 003c37d..a80a295 100644 (file)
@@ -1290,11 +1290,13 @@ If there is no upper entity, call function `mime-preview-quit'."
 If there is no previous entity, it calls function registered in
 variable `mime-preview-over-to-previous-method-alist'."
   (interactive)
-  (while (null (get-text-property (point) 'mime-view-entity))
+  (while (and (not (bobp))
+             (null (get-text-property (point) 'mime-view-entity)))
     (backward-char)
     )
   (let ((point (previous-single-property-change (point) 'mime-view-entity)))
-    (if point
+    (if (and point
+            (>= point (point-min)))
        (if (get-text-property (1- point) 'mime-view-entity)
            (goto-char point)
          (goto-char (1- point))
@@ -1317,7 +1319,8 @@ variable `mime-preview-over-to-next-method-alist'."
     (forward-char)
     )
   (let ((point (next-single-property-change (point) 'mime-view-entity)))
-    (if point
+    (if (and point
+            (<= point (point-max)))
        (progn
          (goto-char point)
          (if (null (get-text-property point 'mime-view-entity))