home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / alt / lucidem / help / 672 < prev    next >
Encoding:
Text File  |  1992-11-10  |  849 b   |  28 lines

  1. x-gateway: rodan.UU.NET from help-lucid-emacs to alt.lucid-emacs.help; Tue, 10 Nov 1992 11:29:47 EST
  2. Date: Tue, 10 Nov 1992 16:26:43 GMT
  3. From: djh@CIS.Prime.COM (David Hughes)
  4. Message-ID: <9211101626.AA28020@CIS.Prime.COM>
  5. Subject: next-line
  6. Newsgroups: alt.lucid-emacs.help
  7. Path: sparky!uunet!wendy-fate.uu.net!help-lucid-emacs
  8. Sender: help-lucid-emacs-request@lucid.com
  9. Lines: 17
  10.  
  11. Some of you may like this little trick:
  12.  
  13. ;; The following kludge is to stop Emacs
  14. ;; inserting newlines when you reach the
  15. ;; bottom of the buffer using C-n
  16.  
  17. (if (not (fboundp 'real-next-line))
  18.     (fset 'real-next-line (symbol-function 'next-line)))
  19.  
  20. (defun next-line (&optional arg)
  21.   (interactive "P")
  22.   (if (save-excursion (end-of-line) (and (eobp) (bolp)))
  23.       (if (interactive-p) (error "End of Buffer"))
  24.     (real-next-line (or arg 1))))
  25.  
  26. --
  27. Regards, David
  28.