Path: galaxy.trc.rwcp.or.jp!mex1!jaist-news!cs.titech!wnoc-tyo-news!sh.wide!cawgw!canongw!cbsws1!shingu
From: shingu@cpr.canon.co.jp (Toshiaki Shingu)
Newsgroups: fj.editor.emacs
Subject: Re: I wan't use ^L on mh-e.
Message-ID: <SHINGU.92Oct15140829@casp12.cpr.canon.co.jp>
Date: 15 Oct 92 05:08:29 GMT
References: <FUJII.92Oct14201433@bud.ews.ncl.omron.co.jp>
	<KEITH.92Oct15094500@qdn.fhl.fujitsu.co.jp>
Sender: news@cbs.canon.co.jp
Distribution: fj
Organization: Canon Inc., Tokyo, Japan
Lines: 139
In-reply-to: keith@fhl.fujitsu.co.jp's message of 15 Oct 92 00:45:00 GMT
Xref: galaxy.trc.rwcp.or.jp fj.editor.emacs:3217
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.editor.emacs&nb=3217&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

keith> $BJX>h<ALd$G$9$,!"$3$$$D$C$F0l9T$:$D$:$i$7$F9T$/;v$,=PMh$^$9$+(B?
keith> $B0l9TKh$:$i$;$k$N$G$"$l$P;d$K$b2<$5$$!#(B

$B:n$C$F$_$^$7$?!#(B
mh-e 3.8 $B$X$N%Q%C%A$G$9!#(B

--- mh-e.el-Thu Oct 15 13:34:17 1992
+++ mh-e.elThu Oct 15 14:07:31 1992
@@ -836,8 +836,29 @@
   "Page the displayed message forwards.
 Scrolls ARG lines or a full screen if no argument is supplied."
   (interactive "P")
-  (scroll-other-window arg))
+  (save-excursion
+    (other-window 1)
+    (move-to-window-line -1)
+    (unwind-protect
+(if (and
+     (eobp)
+     (not (save-restriction (widen) (eobp))))
+    (progn
+      (widen)
+      (forward-page)
+      (narrow-to-region (point)
+(progn
+  (forward-page -1)
+  (if (and (eolp) (not (bobp)))
+      (forward-line 1))
+  (point))))
+  (scroll-up arg))
+      (other-window -1))))
 
+(defun mh-scroll-up-msg ()
+  (interactive)
+  (mh-page-msg 1))
+
 
 (defun mh-previous-page (&optional arg)
   "Page the displayed message backwards.
@@ -845,9 +866,24 @@
   (interactive "P")
   (save-excursion
     (mh-show-message-in-other-window)
+    (move-to-window-line 0)
     (unwind-protect
-(scroll-down arg)
-      (other-window -1))))
+(if (and
+     (bobp)
+     (not (save-restriction (widen) (bobp))))
+    (progn
+      (widen)
+      (if (bolp) (backward-page))
+      (narrow-to-region (point)
+(progn
+  (forward-page -1)
+  (if (and (eolp) (not (bobp)))
+      (forward-line 1))
+  (point)))
+      (goto-char (point-max))
+      (recenter -1))
+    (scroll-down arg))
+    (other-window -1))))
 
 
 (defun mh-previous-undeleted-msg (&optional arg)
@@ -1278,6 +1314,9 @@
       (mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear"
       msg-filename))
   (insert-file-contents msg-filename))
+      (narrow-to-region (point-min) (progn
+      (forward-page)
+      (point)))
       (goto-char (point-min))
       (cond (clean-message-header
      (mh-clean-msg-header (point-min)
@@ -2137,28 +2176,30 @@
 (if mh-delete-yanked-msg-window
     (delete-windows-on mh-show-buffer))
 (set-buffer mh-show-buffer); Find displayed message
-(let ((mh-ins-str (cond ((mark)
- (buffer-substring (region-beginning)
-   (region-end)))
-((eq 'body mh-yank-from-start-of-msg)
- (buffer-substring
-  (save-excursion
-    (goto-char (point-min))
-    (mh-goto-header-end 1)
-    (point))
-  (point-max)))
-(mh-yank-from-start-of-msg
- (buffer-substring (point-min) (point-max)))
-(t
- (buffer-substring (point) (point-max))))))
-  (set-buffer to-buffer)
-  (narrow-to-region to-point to-point)
-  (push-mark)
-  (insert mh-ins-str)
-  (mh-insert-prefix-string mh-ins-buf-prefix)
-  (insert "\n")
-  (widen)))
-      (error "There is no current message")))
+(save-restriction
+  (widen)
+  (let ((mh-ins-str (cond ((mark)
+   (buffer-substring (region-beginning)
+     (region-end)))
+  ((eq 'body mh-yank-from-start-of-msg)
+   (buffer-substring
+    (save-excursion
+      (goto-char (point-min))
+      (mh-goto-header-end 1)
+      (point))
+    (point-max)))
+  (mh-yank-from-start-of-msg
+   (buffer-substring (point-min) (point-max)))
+  (t
+   (buffer-substring (point) (point-max))))))
+    (set-buffer to-buffer)
+    (narrow-to-region to-point to-point)
+    (push-mark)
+    (insert mh-ins-str)
+    (mh-insert-prefix-string mh-ins-buf-prefix)
+    (insert "\n")
+    (widen))))
+    (error "There is no current message")))
 
 
 (defun mh-insert-prefix-string (mh-ins-string)
@@ -2864,6 +2905,7 @@
 (define-key mh-folder-mode-map "p" 'mh-previous-undeleted-msg)
 (define-key mh-folder-mode-map "n" 'mh-next-undeleted-msg)
 (define-key mh-folder-mode-map "o" 'mh-refile-msg)
+(define-key mh-folder-mode-map "\r" 'mh-scroll-up-msg)
 
 
 ;;; Build the letter-mode keymap:
--
$B?.5\(B $BMx><(B $B!w(B $B#C#a#n#o#n(B
