Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!ncis.tis.llnl.gov!helios.ee.lbl.gov!nosc!humu!uhccux!julian From: julian@uhccux.uhcc.hawaii.edu (Julian Cowley) Newsgroups: comp.emacs Subject: Re: forward-line (was Re: Question regarding next-line) Keywords: GNU-only Message-ID: <3657@uhccux.uhcc.hawaii.edu> Date: 5 Apr 89 07:18:44 GMT References: <8363@csli.STANFORD.EDU> <38147@bbn.COM> <4266@omepd.UUCP> <4437@psuvax1.cs.psu.edu> Distribution: usa Organization: University of Hawaii at Manoa Lines: 51 In article <4437@psuvax1.cs.psu.edu> schwartz@shire.cs.psu.edu (Scott Schwartz) writes: >Except that forward-line does some extra magic, like keeping track >of the (temporary) goal column, which we _do_ like. It would be nice >to be able to select the behavior you like by setting a flag, >*auto-extend-buffer-forward*, say. "When in all doubt, patch the source," I always say. Goes along with "if it ain't broke, don't fix it," but I don't heed that one too often... [For GNU Emacs ver. 18.51 or thereabouts. I changed the name of the variable to next-line-append-newline so that its name is closer to the name of the actual function.] *** /usr/local/emacs.18.51/emacs/lisp/simple.el Mon Apr 18 09:35:22 1988 --- simple.el Tue Apr 4 21:13:11 1989 *************** *** 762,765 nil)) (defun next-line (arg) "Move cursor vertically down ARG lines. --- 762,768 ----- nil)) + (defconst next-line-append-newline t + "*If t, make next-line append a newline when at the end of the buffer.") + (defun next-line (arg) "Move cursor vertically down ARG lines. *************** *** 779,783 and more reliable (no dependence on goal column, etc.)." (interactive "p") ! (if (= arg 1) (let ((opoint (point))) (forward-line 1) --- 782,787 ----- and more reliable (no dependence on goal column, etc.)." (interactive "p") ! (if (and (= arg 1) ! next-line-append-newline) (let ((opoint (point))) (forward-line 1) julian@uhccux.uhcc.hawaii.edu uunet!ucsd!nosc!uhccux!julian julian@uhccux.bitnet "Home of the Usenet Defense Fund"