unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Alt-v behavior near beginning of buffer
Date: Thu, 25 Jan 2007 01:47:03 -0700	[thread overview]
Message-ID: <ep9qq6$pih$1@sea.gmane.org> (raw)
In-Reply-To: <45B80425.2070209@gatech.edu>

Matthew Flaschen wrote:
> I am trying to figure out how to create a new function that will scroll
> up a screen if possible, or go the beginning of the buffer otherwise; I
> would then bind this to M-v.  Ultimately, I want to have the corollary
> behavior for C-v.
> 
> I can't figure out how to test whether it is possible to scroll up/down
> an entire screen.  I found (goto-char (point-min/max)) , so that part
> should be okay.

(if (pos-visible-in-window-p (point-min))
     (beginning-of-buffer)
   (scroll-down))

-- 
Kevin Rodgers
Denver, Colorado, USA

  reply	other threads:[~2007-01-25  8:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25  1:13 Alt-v behavior near beginning of buffer Matthew Flaschen
2007-01-25  8:47 ` Kevin Rodgers [this message]
2007-01-25 15:46   ` Matthew Flaschen
2007-01-25 15:57     ` Matthew Flaschen
2007-01-26  0:25       ` Matthew Flaschen
2007-01-30  6:00         ` Kevin Rodgers
2007-01-30 15:59           ` Matthew Flaschen
2007-01-31  5:10             ` Kevin Rodgers
2007-01-31  6:29               ` Matthew Flaschen
2007-01-30  6:07       ` Kevin Rodgers
2007-01-30 16:02         ` Matthew Flaschen
     [not found] <mailman.3548.1169687602.2155.help-gnu-emacs@gnu.org>
2007-01-27  5:40 ` Eric Eide
2007-01-27  7:36   ` Matthew Flaschen

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='ep9qq6$pih$1@sea.gmane.org' \
    --to=kevin.d.rodgers@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).