From 7a5b47b0d104746566f8d214c884c5ff6603bbaa Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 17 Mar 1997 17:12:13 +0000 Subject: [PATCH] (mime-view-scroll-down-entity): New implementation. --- mime-view.el | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/mime-view.el b/mime-view.el index e0ee017..68fc496 100644 --- a/mime-view.el +++ b/mime-view.el @@ -6,7 +6,7 @@ ;; Created: 1994/7/13 ;; Renamed: 1994/8/31 from tm-body.el ;; Renamed: 1997/02/19 from tm-view.el -;; Version: $Revision: 0.61 $ +;; Version: $Revision: 0.62 $ ;; Keywords: MIME, multimedia, mail, news ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -40,7 +40,7 @@ ;;; (defconst mime-view-RCS-ID - "$Id: mime-view.el,v 0.61 1997-03-17 16:58:57 morioka Exp $") + "$Id: mime-view.el,v 0.62 1997-03-17 17:12:13 morioka Exp $") (defconst mime-view-version (get-version-string mime-view-RCS-ID)) @@ -1104,10 +1104,12 @@ If reached to (point-max), it calls function registered in variable ))) (defun mime-view-scroll-down-entity (&optional h) - "Scroll down current entity." + "Scroll down current entity. +If reached to (point-min), it calls function registered in variable +`mime-view-over-to-previous-method-alist'." (interactive) (or h - (setq h (- (window-height) 1)) + (setq h (1- (window-height))) ) (if (= (point) (point-min)) (let ((f (assq mime::preview/original-major-mode @@ -1115,26 +1117,23 @@ If reached to (point-max), it calls function registered in variable (if f (funcall (cdr f)) )) - (let ((pcl mime::preview/content-list) - (p (point)) - pp beg) - (setq pp - (or (let ((i (- (length pcl) 1))) - (catch 'tag - (while (> i 0) - (setq beg (mime::preview-content-info/point-min - (nth i pcl))) - (if (> p beg) - (throw 'tag beg) - ) - (setq i (- i 1)) - ))) - (point-min))) + (let (point) + (save-excursion + (catch 'tag + (while (> (point) 1) + (if (setq point + (previous-single-property-change (point) + 'mime-view-cinfo)) + (throw 'tag t) + ) + (backward-char) + ) + (setq point (point-min)) + )) (forward-line (- h)) - (if (< (point) pp) - (goto-char pp) - ))) - ) + (if (< (point) point) + (goto-char point) + )))) (defun mime-view-next-line-content () (interactive) -- 1.7.10.4