home *** CD-ROM | disk | FTP | other *** search
- x-gateway: rodan.UU.NET from help-lucid-emacs to alt.lucid-emacs.help; Tue, 10 Nov 1992 11:29:47 EST
- Date: Tue, 10 Nov 1992 16:26:43 GMT
- From: djh@CIS.Prime.COM (David Hughes)
- Message-ID: <9211101626.AA28020@CIS.Prime.COM>
- Subject: next-line
- Newsgroups: alt.lucid-emacs.help
- Path: sparky!uunet!wendy-fate.uu.net!help-lucid-emacs
- Sender: help-lucid-emacs-request@lucid.com
- Lines: 17
-
- Some of you may like this little trick:
-
- ;; The following kludge is to stop Emacs
- ;; inserting newlines when you reach the
- ;; bottom of the buffer using C-n
-
- (if (not (fboundp 'real-next-line))
- (fset 'real-next-line (symbol-function 'next-line)))
-
- (defun next-line (&optional arg)
- (interactive "P")
- (if (save-excursion (end-of-line) (and (eobp) (bolp)))
- (if (interactive-p) (error "End of Buffer"))
- (real-next-line (or arg 1))))
-
- --
- Regards, David
-