My solution is not to change the default scroll of Emac, but to create a key sequence command from a macro. This way you have a convenient way to scroll one line at a time when you want. Not perfect, but very simple. It just happens that M- (โ) and M- (โ) are available, so I used.
Here is how I did it. First, you need to record a macro to scroll one line up and down.
Start macro
Cx (
Scroll down down
Cu 1 Cv
Stop macro
Cx )
To scroll up, use
Cu 1 Mv
Then you need to name the macro.
Mx name-last-kbd-macro
Give it a name when prompted:
down-one-line
Then simply use the following to bind the key sequence to the name of this command:
Mx global-set-key
And when prompted, use something like:
M-(down arrow)
He will then ask you which team you want to link, and you must give him the name that you invented earlier, for example, down one line.
This is where I got this information. You can also find instructions below and elsewhere about adding macros to your .emacs file.
Here to describe the definition of a macro
Here for scroll control
Josh Cason Aug 04 '11 at 18:01 2011-08-04 18:01
source share