From c3ca1bc22887e60ea35041fe49b5644b5d8bcee0 Mon Sep 17 00:00:00 2001 From: hayashi Date: Mon, 20 Sep 1999 09:11:20 +0000 Subject: [PATCH] Use scroll-up and scroll-down in MIME-View-mode. --- ChangeLog | 41 ++++++++++++++++++++-------------- mime-view.el | 70 +++++++++++++++++++++++++++++++--------------------------- 2 files changed, 63 insertions(+), 48 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe9d985..b1d5750 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +1999-09-20 Yoshiki Hayashi + + * mime-view.el (mime-preview-scroll-up-entitiy, + mime-preview-scroll-down-entity): Use scroll-up and scroll-down + instead of forward-line. + (mime-preview-next-line-entity, + mime-preview-previous-line-entity): Add optional argument LINES + and scroll LINES lines if specified. Add doc-string. + 1999-09-13 MORIOKA Tomohiko * SEMI: Version 1.13.6 (Komatsu) released. @@ -24,7 +33,7 @@ 1999-08-18 MORIOKA Tomohiko - * REMI: Version 1.13.2 (-DÒike-Ikoinomori)-A released. + * REMI: Version 1.13.2 (.DŽÒike-Ikoinomori) released. 1999-08-17 Katsumi Yamaoka @@ -95,7 +104,7 @@ 1999-07-27 MORIOKA Tomohiko - * SEMI: Version 1.13.5 (Meih-Dò)-A released. + * SEMI: Version 1.13.5 (MeihŽò) released. 1999-07-27 MORIOKA Tomohiko @@ -398,7 +407,7 @@ 1999-01-21 MORIOKA Tomohiko - * SEMI: Version 1.13.0 (Matt-Dò)-A released. + * SEMI: Version 1.13.0 (MattŽò) released. 1999-01-21 MORIOKA Tomohiko @@ -896,7 +905,7 @@ 1998-07-08 MORIOKA Tomohiko - * REMI: Version 1.8.3 (Ecch-Dþ-Nakagawa)-A released. + * REMI: Version 1.8.3 (EcchŽþ-Nakagawa) released. * mime-play.el (mime-delq-null-situation): Add new optional argument `ignored-value'. @@ -925,7 +934,7 @@ 1998-07-08 MORIOKA Tomohiko - * REMI: Version 1.8.2 (N-Dòmachi)-A released. + * REMI: Version 1.8.2 (NŽòmachi) released. 1998-07-07 MORIOKA Tomohiko @@ -1044,7 +1053,7 @@ 1998-06-28 MORIOKA Tomohiko - * REMI: Version 1.8.0 (Ecch-Dþ-Kokubu)-A released. + * REMI: Version 1.8.0 (EcchŽþ-Kokubu) released. 1998-06-26 MORIOKA Tomohiko @@ -1880,7 +1889,7 @@ 1998-06-04 MORIOKA Tomohiko - * SEMI: Version 1.5.0 (Nishi-Ny-Dþzen)-A released. + * SEMI: Version 1.5.0 (Nishi-NyŽþzen) released. * README.en (Required environment): Modify for FLIM 1.3.0. @@ -1932,7 +1941,7 @@ 1998-06-01 MORIOKA Tomohiko - * SEMI: Version 1.4.6 (Ny-Dþzen)-A released. + * SEMI: Version 1.4.6 (NyŽþzen) released. 1998-05-28 MORIOKA Tomohiko @@ -2145,7 +2154,7 @@ 1998-05-15 MORIOKA Tomohiko - * SEMI: Version 1.4.4 (Ecch-Dþ-Miyazaki)-A released. + * SEMI: Version 1.4.4 (EcchŽþ-Miyazaki) released. * mime-play.el (mime-mailcap-method-filename-alist): New variable. (mime-mailcap-method-sentinel): New function. @@ -2271,7 +2280,7 @@ 1998-05-06 MORIOKA Tomohiko - * SEMI: Version 1.4.1 (-DÒmi)-A released. + * SEMI: Version 1.4.1 (ŽÒmi) released. * README.en (Required environment): Modify for FLIM 1.2.0. @@ -2431,7 +2440,7 @@ 1998-04-25 MORIOKA Tomohiko - * SEMI: Version 1.3.2 (N-Dò)-A was released. + * SEMI: Version 1.3.2 (NŽò) was released. * mime-edit.el (mime-edit-mode-entity-prefix): New variable. (mime-edit-mode-entity-map): New variable. @@ -3086,7 +3095,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Žòdaimae) was released. 1998-03-12 MORIOKA Tomohiko @@ -3169,7 +3178,7 @@ * mime-file.el: Rename `mime-article/extract-file' -> `mime-extract-current-entity'. -1998-03-03 François Pinard +1998-03-03 Fran.AŽçois Pinard * mime-edit.el (mime-edit-insert-signature): Function `mime-edit-insert-tag' is sometimes called with more arguments @@ -3198,7 +3207,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. @@ -3335,14 +3344,14 @@ 1997-11-16 MORIOKA Tomohiko - * SEMI: Version 0.116 (D-Dòhòji)-A was released. + * SEMI: Version 0.116 (DŽòhŽòji) 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.AŽçois 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 964c687..04efc7d 100644 --- a/mime-view.el +++ b/mime-view.el @@ -1346,22 +1346,23 @@ variable `mime-preview-over-to-next-method-alist'." If reached to (point-max), it calls function registered in variable `mime-preview-over-to-next-method-alist'." (interactive) - (or h - (setq h (1- (window-height))) - ) - (if (= (point) (point-max)) + (if (eobp) (let ((f (assq (mime-preview-original-major-mode) - mime-preview-over-to-next-method-alist))) - (if f - (funcall (cdr f)) - )) + mime-preview-over-to-next-method-alist))) + (if f + (funcall (cdr f)) + )) (let ((point (or (next-single-property-change (point) 'mime-view-entity) - (point-max)))) - (forward-line h) - (if (> (point) point) - (goto-char point) - ) + (point-max))) + (bottom (window-end (selected-window)))) + (if (and (not h) + (> bottom point)) + (goto-char point) + (condition-case nil + (scroll-up h) + (end-of-buffer + (goto-char (point-max))))) ))) (defun mime-preview-scroll-down-entity (&optional h) @@ -1369,34 +1370,39 @@ If reached to (point-max), it calls function registered in variable If reached to (point-min), it calls function registered in variable `mime-preview-over-to-previous-method-alist'." (interactive) - (or h - (setq h (1- (window-height))) - ) - (if (= (point) (point-min)) + (if (bobp) (let ((f (assq (mime-preview-original-major-mode) mime-preview-over-to-previous-method-alist))) - (if f - (funcall (cdr f)) - )) + (if f + (funcall (cdr f)) + )) (let ((point (or (previous-single-property-change (point) 'mime-view-entity) - (point-min)))) - (forward-line (- h)) - (if (< (point) point) - (goto-char point) - )))) + (point-min))) + (top (window-start (selected-window)))) + (if (and (not h) + (< top point)) + (goto-char point) + (condition-case nil + (scroll-down h) + (beginning-of-buffer + (goto-char (point-min))))) + ))) -(defun mime-preview-next-line-entity () - (interactive) - (mime-preview-scroll-up-entity 1) +(defun mime-preview-next-line-entity (&optional lines) + "Scroll up one line (or prefix LINES lines). +If LINES is negative, scroll down LINES lines." + (interactive "p") + (mime-preview-scroll-up-entity (or lines 1)) ) -(defun mime-preview-previous-line-entity () - (interactive) - (mime-preview-scroll-down-entity 1) +(defun mime-preview-previous-line-entity (&optional lines) + "Scrroll down one line (or prefix LINES lines). +If LINES is negative, scroll up LINES lines." + (interactive "p") + (mime-preview-scroll-down-entity (or lines 1)) ) - ;;; @@ quitting ;;; -- 1.7.10.4