help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quick Emacs Question


From: Giorgos Keramidas
Subject: Re: Quick Emacs Question
Date: Fri, 02 May 2008 02:02:05 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix)

On Thu, 1 May 2008 09:12:30 -0700, "Paul S" <address@hidden> wrote:
> Hi there!
>
> When you are in Emacs, and the cursor is at the top of the window, you
> press UP and it does a Page Up.
>
> Is there any way to scroll up line-by-line? (IE you press up, ONE line
> disappears at the bottom and ONE more line is visible at the
> top. Rather than 20 lines at a time). (Useful for when you want to
> keep looking at two different things in a C file.)

Hi Paul,

Yes, there is a way to customize scrolling to achieve what you want.

To get the behavior you just described, you can customize or set in your
~/.emacs file `scroll-conservatively' to 1.

Note that the value of `scroll-conservatively' becomes buffer-local when
set, so it can have different values in different modes.  For example if
you want the default to be 1 for all new buffers (the behavior you just
described), but the original Emacs behavior is ok for C code, you can
use the following in your ~/.emacs file to set its value:

    (setq-default scroll-conservatively 1)
    (add-hook c-mode-common-hook
      '(lambda ()
         (setq scroll-conservatively 0)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]