(mime-preview-move-to-upper): Scroll according to the variable
authorhayashi <hayashi>
Wed, 6 Oct 1999 03:29:50 +0000 (03:29 +0000)
committerhayashi <hayashi>
Wed, 6 Oct 1999 03:29:50 +0000 (03:29 +0000)
mime-preview-move-scroll.

ChangeLog
mime-view.el

index 135c8fa..a321950 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-10-06  Yoshiki Hayashi  <t90553@mail.ecc.u-tokyo.ac.jp>
+
+       * mime-view.el (mime-preview-move-to-upper): Scroll
+       according to mime-preview-move-scroll.
+
 1999-10-05  Yoshiki Hayashi  <t90553@mail.ecc.u-tokyo.ac.jp>
 
        * mime-view.el (mime-preview-scroll-down-entity,
index b93053a..119d972 100644 (file)
@@ -1287,8 +1287,17 @@ If there is no upper entity, call function `mime-preview-quit'."
        (while (setq point (previous-single-property-change
                            (point) 'mime-view-entity))
          (goto-char point)
-         (if (eq r (get-text-property (point) 'mime-view-entity))
-             (throw 'tag t)
+         (when (eq r (get-text-property (point) 'mime-view-entity))
+           (if (or (eq mime-preview-move-scroll t)
+                   (and mime-preview-move-scroll
+                        (>= point
+                            (save-excursion
+                              (move-to-window-line -1)
+                              (forward-line (* -1 next-screen-context-lines))
+                              (beginning-of-line)
+                              (point)))))
+               (recenter next-screen-context-lines))
+           (throw 'tag t)
            )
          )
        (mime-preview-quit)