all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Matthew Flaschen <matthew.flaschen@gatech.edu>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Alt-v behavior near beginning of buffer
Date: Tue, 30 Jan 2007 10:59:24 -0500	[thread overview]
Message-ID: <45BF6B5C.5090709@gatech.edu> (raw)
In-Reply-To: <epmmuc$gu7$1@sea.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 996 bytes --]

Kevin Rodgers wrote:
> Matthew Flaschen wrote:
>> I wanted it to go to the beginning of the line either way, so I changed
>> it to:
>>
>> (defun power-bottom ()
>> "Scrolls down a screen if possible, or goes to the bottom of the buffer"
>> (interactive)
>> (if (pos-visible-in-window-p (point-max))
>>     ((lambda()
>>        (goto-char (point-max))
>>        (beginning-of-line)))
>>   (scroll-up)))
>>
>> That lambda syntax took me a while to grasp.  Is there any easier way to
>> do this, short of creating a function just for the lambda?
> 
> Of course:
> 
>     (progn
>       (goto-char (point-max))
>       (beginning-of-line))

Thanks, that's a bit simpler.  I'd seen that command before, but forgot
it (and probably never really understood what it did).

> 
> A good Emacs Lisp exercise would be to allow your new command to accept
> a prefix argument just like scroll-up does, and pass it to scroll-up.

I may do that at some point.

Matt Flaschen



[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

  reply	other threads:[~2007-01-30 15:59 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
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 [this message]
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

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

  git send-email \
    --in-reply-to=45BF6B5C.5090709@gatech.edu \
    --to=matthew.flaschen@gatech.edu \
    --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.