From: morioka Date: Mon, 17 Mar 1997 16:58:57 +0000 (+0000) Subject: (mime-view-scroll-up-entity): New implementation. X-Git-Tag: Hokutetsu-Ishikawa-new~69 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7717e834de6070e430eaf8a04a946302678e3b6;p=elisp%2Fsemi.git (mime-view-scroll-up-entity): New implementation. --- diff --git a/mime-view.el b/mime-view.el index 2997e99..e0ee017 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.60 $ +;; Version: $Revision: 0.61 $ ;; 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.60 1997-03-17 16:19:30 morioka Exp $") + "$Id: mime-view.el,v 0.61 1997-03-17 16:58:57 morioka Exp $") (defconst mime-view-version (get-version-string mime-view-RCS-ID)) @@ -113,6 +113,10 @@ ;; (method "xterm" nil ;; "-e" "showexternal" ;; 'file '"access-type" '"name" '"site" '"directory")) + ((type . "message/external-body") + ("access-type" . "anon-ftp") + (method . mime-article/decode-message/external-ftp) + ) ((type . "message/rfc822") (method . mime-article/view-message/rfc822) (mode . "play") @@ -121,10 +125,6 @@ (method . mime-article/decode-message/partial) (mode . "play") ) - ((type . "message/external-body") - ("access-type" . "anon-ftp") - (method . mime-article/decode-message/external-ftp) - ) ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file) (mode . "play") @@ -1081,10 +1081,12 @@ variable `mime-view-over-to-next-method-alist'." ))) (defun mime-view-scroll-up-entity (&optional h) - "Scroll up current entity." + "Scroll up current entity. +If reached to (point-max), it calls function registered in variable +`mime-view-over-to-next-method-alist'." (interactive) (or h - (setq h (- (window-height) 1)) + (setq h (1- (window-height))) ) (if (= (point) (point-max)) (let ((f (assq mime::preview/original-major-mode @@ -1092,25 +1094,14 @@ variable `mime-view-over-to-next-method-alist'." (if f (funcall (cdr f)) )) - (let ((pcl mime::preview/content-list) - (p (point)) - np beg) - (setq np - (or (catch 'tag - (while pcl - (setq beg (mime::preview-content-info/point-min (car pcl))) - (if (< p beg) - (throw 'tag beg) - ) - (setq pcl (cdr pcl)) - )) - (point-max))) + (let ((point + (or (next-single-property-change (point) 'mime-view-cinfo) + (point-max)))) (forward-line h) - (if (> (point) np) - (goto-char np) + (if (> (point) point) + (goto-char point) ) - )) - ) + ))) (defun mime-view-scroll-down-entity (&optional h) "Scroll down current entity."