|
From: | Kevin Rodgers |
Subject: | Re: Alt-v behavior near beginning of buffer |
Date: | Mon, 29 Jan 2007 23:00:53 -0700 |
User-agent: | Thunderbird 1.5.0.9 (Macintosh/20061207) |
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)) 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. -- Kevin Rodgers Denver, Colorado, USA
[Prev in Thread] | Current Thread | [Next in Thread] |