Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!xanth!mcnc!rti!talos!kjones From: kjones@talos.UUCP (Kyle Jones) Newsgroups: comp.emacs Subject: Re: indenting in emacs Message-ID: <453@talos.UUCP> Date: 28 Feb 89 13:45:13 GMT References: <1045@wpi.wpi.edu> Reply-To: kjones@talos.UUCP (Kyle Jones) Organization: Philip Morris Research Center, Richmond, VA Lines: 19 Robert W Langer writes: >Is there a way to have emacs indent each line the same as the last >instead of going back to the margin each time return is hit. This is >used in some programming editors, and I was wondering if there was a >way to do it in emacs, hopefully as a mode. [ Let's not forget that this is a forum for discussion of all types of Emacs editors. Most nontrivial questions have different answers depending on the Emacs used. Please be specific as to which Emacs you use. ] I'll answer w.r.t GNU Emacs. Use Indented Text mode and bind RET to newline-and-indent. `M-x indented-text-mode' gets you into Indented Text mode and you can put the following in your .emacs file to make the binding apply only to Indented Text mode. (define-key indented-text-mode-map "\r" 'newline-and-indent)