in a German newsgroup somebody asked if it would be possible to keep
the position of point fixed while doing vertical motion ...
Yes. Here are defuns and keybindings to do this for arrow keys.
These go into a .emacs file. Point stays fixed until it comes to the
top or bottom of a window; then it stays within the window. I use
these keybindings very frequently both in read-write buffers and in
read-only buffers.
(defun scroll-forward-one-line ()
"Scroll the text up one line.
A replacement for the three keystroke sequence
C-u 1 C-v."
(interactive)
(scroll-up 1))
(defun scroll-backward-one-line ()
"Scroll the text down one line.
A replacement for the three keystroke sequence
C-u 1 M-v."
(interactive)
(scroll-down 1))
(global-set-key [down] 'scroll-forward-one-line) ; Down arrow key
(global-set-key [up] 'scroll-backward-one-line) ; Up arrow key
--
Robert J. Chassell
[EMAIL PROTECTED] GnuPG Key ID: 004B4AC8
http://www.rattlesnake.com http://www.teak.cc
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel