[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scroll-down and beginning-of-buffer
From: |
Paul Raines |
Subject: |
scroll-down and beginning-of-buffer |
Date: |
Fri, 7 Jan 2005 12:05:31 -0500 (EST) |
I am trying to ge the Page Up and Page Down keys to behave like
they do in almost every other editor out there. Specifically, when
hitting Page Up repeatedly, you eventually end up with the curson
on the very first line of the file. Instead, emails stops at some
random line below and refuses to go any further and just displays
"beginning of buffer" in the mini-buffer.
I have tried definining the following function:
(defun my-scroll-down (arg)
"Same as scroll-down except really goes to beginning of file"
(interactive "P")
(if (not (call-interactively 'scroll-down))
(call-interactively 'beginning-of-buffer)))
Which works but has the horrible side effect of reseting the mark
each time it is used to the region scrolled. How do I stop it
from doing that? Or is the better way to get what I want?
--
---------------------------------------------------------------
Paul Raines email: raines@nmr.mgh.harvard.edu
MGH/MIT/HMS Athinoula A. Martinos Center for Biomedical Imaging
149 (2301) 13th Street Charlestown, MA 02129 USA