[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scroll lock
From: |
Robert J. Chassell |
Subject: |
Re: Scroll lock |
Date: |
Wed, 22 Jun 2005 12:13:15 +0000 (UTC) |
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
address@hidden GnuPG Key ID: 004B4AC8
http://www.rattlesnake.com http://www.teak.cc
- Re: Scroll lock, (continued)
- Re: Scroll lock, Richard M. Stallman, 2005/06/22
- Re: Scroll lock, Miles Bader, 2005/06/23
- Re: Scroll lock, Ralf Angeli, 2005/06/23
- Re: Scroll lock, Richard M. Stallman, 2005/06/24
- Re: Scroll lock, Ralf Angeli, 2005/06/26
- Re: Scroll lock, Richard M. Stallman, 2005/06/27
- Re: Scroll lock, Ralf Angeli, 2005/06/29
- Re: Scroll lock, Richard M. Stallman, 2005/06/29
- Re: Scroll lock, Ralf Angeli, 2005/06/30
- Re: Scroll lock, Miles Bader, 2005/06/30
Re: Scroll lock,
Robert J. Chassell <=
Re: Scroll lock, Thien-Thi Nguyen, 2005/06/22