From: hayashi Date: Tue, 5 Oct 1999 04:07:35 +0000 (+0000) Subject: (mime-preview-scroll-down-entity, mime-preview-scroll-up-entity): X-Git-Tag: semi-1_13_7~4 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=596b8e24ec7c223cdc9d297a202e5f2b2d5a1668;p=elisp%2Fsemi.git (mime-preview-scroll-down-entity, mime-preview-scroll-up-entity): Recenter when moving to a next entity. (mime-preview-move-scroll): New variable. (mime-preview-move-to-previous, mime-preview-move-to-next): Recenter according to the variable mime-preview-move-scroll. --- diff --git a/ChangeLog b/ChangeLog index 6d8d642..a7a57be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +1999-10-05 Yoshiki Hayashi + + * mime-view.el (mime-preview-scroll-down-entity, + mime-preview-scroll-up-entity): Recenter when moving to + a next entity. + (mime-preview-move-scroll): New variable. + (mime-preview-move-to-previous, mime-preview-move-to-next): + Recenter according to the variable mime-preview-move-scroll. + 1999-10-04 Katsumi Yamaoka * mime-view.el (mime-preview-move-to-next): Attempt to go to the @@ -68,7 +77,7 @@ 1999-08-18 MORIOKA Tomohiko - * REMI: Version 1.13.2 (-DÒike-Ikoinomori)-A released. + * REMI: Version 1.13.2 (-DRike-Ikoinomori) released. 1999-08-17 Katsumi Yamaoka @@ -139,7 +148,7 @@ 1999-07-27 MORIOKA Tomohiko - * SEMI: Version 1.13.5 (Meih-Dò)-A released. + * SEMI: Version 1.13.5 (Meih-Dr) released. 1999-07-27 MORIOKA Tomohiko @@ -442,7 +451,7 @@ 1999-01-21 MORIOKA Tomohiko - * SEMI: Version 1.13.0 (Matt-Dò)-A released. + * SEMI: Version 1.13.0 (Matt-Dr) released. 1999-01-21 MORIOKA Tomohiko @@ -940,7 +949,7 @@ 1998-07-08 MORIOKA Tomohiko - * REMI: Version 1.8.3 (Ecch-Dþ-Nakagawa)-A released. + * REMI: Version 1.8.3 (Ecch-D~-Nakagawa) released. * mime-play.el (mime-delq-null-situation): Add new optional argument `ignored-value'. @@ -969,7 +978,7 @@ 1998-07-08 MORIOKA Tomohiko - * REMI: Version 1.8.2 (N-Dòmachi)-A released. + * REMI: Version 1.8.2 (N-Drmachi) released. 1998-07-07 MORIOKA Tomohiko @@ -1088,7 +1097,7 @@ 1998-06-28 MORIOKA Tomohiko - * REMI: Version 1.8.0 (Ecch-Dþ-Kokubu)-A released. + * REMI: Version 1.8.0 (Ecch-D~-Kokubu) released. 1998-06-26 MORIOKA Tomohiko @@ -1924,7 +1933,7 @@ 1998-06-04 MORIOKA Tomohiko - * SEMI: Version 1.5.0 (Nishi-Ny-Dþzen)-A released. + * SEMI: Version 1.5.0 (Nishi-Ny-D~zen) released. * README.en (Required environment): Modify for FLIM 1.3.0. @@ -1976,7 +1985,7 @@ 1998-06-01 MORIOKA Tomohiko - * SEMI: Version 1.4.6 (Ny-Dþzen)-A released. + * SEMI: Version 1.4.6 (Ny-D~zen) released. 1998-05-28 MORIOKA Tomohiko @@ -2189,7 +2198,7 @@ 1998-05-15 MORIOKA Tomohiko - * SEMI: Version 1.4.4 (Ecch-Dþ-Miyazaki)-A released. + * SEMI: Version 1.4.4 (Ecch-D~-Miyazaki) released. * mime-play.el (mime-mailcap-method-filename-alist): New variable. (mime-mailcap-method-sentinel): New function. @@ -2315,7 +2324,7 @@ 1998-05-06 MORIOKA Tomohiko - * SEMI: Version 1.4.1 (-DÒmi)-A released. + * SEMI: Version 1.4.1 (-DRmi) released. * README.en (Required environment): Modify for FLIM 1.2.0. @@ -2475,7 +2484,7 @@ 1998-04-25 MORIOKA Tomohiko - * SEMI: Version 1.3.2 (N-Dò)-A was released. + * SEMI: Version 1.3.2 (N-Dr) was released. * mime-edit.el (mime-edit-mode-entity-prefix): New variable. (mime-edit-mode-entity-map): New variable. @@ -3130,7 +3139,7 @@ 1998-03-13 MORIOKA Tomohiko - * SEMI: Version 1.0.2 (Nonoichi-K-Dòdaimae)-A was released. + * SEMI: Version 1.0.2 (Nonoichi-K-Drdaimae) was released. 1998-03-12 MORIOKA Tomohiko @@ -3213,7 +3222,7 @@ * mime-file.el: Rename `mime-article/extract-file' -> `mime-extract-current-entity'. -1998-03-03 François Pinard +1998-03-03 Fran-Agois Pinard * mime-edit.el (mime-edit-insert-signature): Function `mime-edit-insert-tag' is sometimes called with more arguments @@ -3242,7 +3251,7 @@ 1998-02-25 MORIOKA Tomohiko - * SEMI: Version 1.0.0 (Nukaj-Dþtaku-mae)-A was released. + * SEMI: Version 1.0.0 (Nukaj-D~taku-mae) was released. * SEMI-ELS: Remove mime-tar.el. @@ -3379,14 +3388,14 @@ 1997-11-16 MORIOKA Tomohiko - * SEMI: Version 0.116 (D-Dòhòji)-A was released. + * SEMI: Version 0.116 (D-Drhrji) was released. 1997-11-15 MORIOKA Tomohiko * mime-view.el, mime-pgp.el, mime-partial.el: Rename `mime::article/content-info' -> `mime-raw-content-info'. -1997-11-11 François Pinard +1997-11-11 Fran-Agois Pinard * mime-edit.el: Modify space in prompt and removespurious trailing spaces in the files. (cf. [tm-en:1507]) diff --git a/mime-view.el b/mime-view.el index a80a295..b93053a 100644 --- a/mime-view.el +++ b/mime-view.el @@ -62,6 +62,15 @@ :group 'mime-view :type 'file) +(defcustom mime-preview-move-scroll nil + "*Decides whether to scroll when moving to next entity. +When t, scroll the buffer. Non-nil but not t means scroll when +the next entity is within next-screen-context-lines from top or +buttom. Nil means don't scroll at all." + :group 'mime-view + :type '(choice (const :tag "Off" nil) + (const :tag "On" t) + (sexp :tag "Situation" 1))) ;;; @ in raw-buffer (representation space) ;;; @@ -1298,7 +1307,17 @@ variable `mime-preview-over-to-previous-method-alist'." (if (and point (>= point (point-min))) (if (get-text-property (1- point) 'mime-view-entity) - (goto-char point) + (progn (goto-char point) + (if + (or (eq mime-preview-move-scroll t) + (and mime-preview-move-scroll + (<= point + (save-excursion + (move-to-window-line 0) + (forward-line next-screen-context-lines) + (end-of-line) + (point))))) + (recenter (* -1 next-screen-context-lines)))) (goto-char (1- point)) (mime-preview-move-to-previous) ) @@ -1325,6 +1344,17 @@ variable `mime-preview-over-to-next-method-alist'." (goto-char point) (if (null (get-text-property point 'mime-view-entity)) (mime-preview-move-to-next) + (and + (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)) )) (let ((f (assq (mime-preview-original-major-mode) mime-preview-over-to-next-method-alist))) @@ -1350,7 +1380,8 @@ If reached to (point-max), it calls function registered in variable (bottom (window-end (selected-window)))) (if (and (not h) (> bottom point)) - (goto-char point) + (progn (goto-char point) + (recenter next-screen-context-lines)) (condition-case nil (scroll-up h) (end-of-buffer @@ -1374,7 +1405,8 @@ If reached to (point-min), it calls function registered in variable (top (window-start (selected-window)))) (if (and (not h) (< top point)) - (goto-char point) + (progn (goto-char point) + (recenter (* -1 next-screen-context-lines))) (condition-case nil (scroll-down h) (beginning-of-buffer