From: chming <chming@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: `scroll-conservatively'
Date: 27 May 2007 12:37:10 -0700 [thread overview]
Message-ID: <1180294630.076187.205470@i13g2000prf.googlegroups.com> (raw)
In-Reply-To: <mailman.1334.1180289873.32220.help-gnu-emacs@gnu.org>
flet it go. try this way:
(defun scroll-one-line-up (&optional arg)
"Scroll the selected window up (forward in the text) one line (or N
lines)."
(interactive "p")
(let ((pos
(save-excursion
(forward-line (* arg -1))
(point))))
(if (not (pos-visible-in-window-p pos))
(progn
(scroll-down (or arg 1))
(forward-line -1))
(forward-line (* arg -1)))))
(defun scroll-one-line-down (&optional arg)
"Scroll the selected window down (backward in the text) one line (or
N)."
(interactive "p")
(let ((pos
(save-excursion
(forward-line (or arg 1))
(point))))
(if (not (pos-visible-in-window-p pos))
(progn
(scroll-up (or arg 1))
(forward-line (or arg 1)))
(forward-line (or arg 1)))))
(global-set-key (kbd "C-p") 'scroll-one-line-up)
(global-set-key (kbd "C-n") 'scroll-one-line-down)
On May 27, 11:17 am, Leo <sdl....@gmail.com> wrote:
> Hi all,
>
> I try to set scroll-conservatively to an integer, however I fail to see
> the difference for different integers. Ideas?
>
> Thanks,
> --
> Leo <sdl.web AT gmail.com> (GPG Key: 9283AA3F)
next parent reply other threads:[~2007-05-27 19:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1334.1180289873.32220.help-gnu-emacs@gnu.org>
2007-05-27 19:37 ` chming [this message]
2007-05-27 20:22 ` `scroll-conservatively' chming
2007-05-27 18:17 `scroll-conservatively' Leo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1180294630.076187.205470@i13g2000prf.googlegroups.com \
--to=chming@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.