Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!boulder!cu-den!udenva!isis!ico!cadnetix.UUCP!pem From: pem@cadnetix.UUCP (Paul Meyer) Newsgroups: comp.emacs Subject: Re: commands wanted Message-ID: <1181@cadnetix.UUCP> Date: Wed, 25-Nov-87 18:32:40 EST Article-I.D.: cadnetix.1181 Posted: Wed Nov 25 18:32:40 1987 Date-Received: Sun, 29-Nov-87 12:37:12 EST References: <8711240526.AA17515@EDDIE.MIT.EDU> Reply-To: pem@cadnetix.UUCP (Paul Meyer) Organization: Cadnetix Corp., Boulder, CO Lines: 38 [] I hope this isn't one of a flurry of followups, but as my mail utilities are currently unusable I can't mail this. In any case, Henry Kautz writes >Anybody written any of the following commands? If so, please >mail/post, thanks. >1. move cursor to top of window >2. move cursor to bottom of window >3. scroll window so line cursor is on is at top of window >4. scroll window so line cursor is on is at bottom of window These requests are trivially easy, but I had to figure them out for myself when we first got GNU emacs, so here they are: ; number 1 (fset 'top-of-window "\C-u0\er") ; move-to-window-line 0 ; number 2 (fset 'bottom-of-window "\C-u-1\er") ; move-to-window-line -1 ; number 3 (fset 'line-to-top-of-window "\C-u0\C-l") ; recenter 0 ; number 4 (fset 'line-to-bottom-of-window "\C-u-1\C-l") ; recenter -1 These macros could also be replaced by real defuns, like (defun top-of-window nil "Move the cursor to the top of the current window." (interactive) (move-to-window-line 0)) -- pem@cadnetix.UUCP (hao!isis!ico!cadnetix!pem)