Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!oliveb!pyramid!prls!philabs!ttidca!retix!derrell From: derrell@retix.retix.retix.com (Derrell Lipman) Newsgroups: comp.emacs Subject: Re: indenting in emacs Message-ID: Date: 2 Mar 89 18:46:15 GMT References: <1045@wpi.wpi.edu> Sender: derrell@retix.retix.COM Organization: Retix, Santa Monica Lines: 29 In-reply-to: guardian@wpi.wpi.edu's message of 27 Feb 89 02:17:18 GMT In article <1045@wpi.wpi.edu> guardian@wpi.wpi.edu (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. > here is a function which sets the fill prefix to a bunch of blanks. if you indent to column 23, and then execute this function, the fill prefix will be set to 23 blanks and pressing return will automagically indent to column 23 (in text mode). resetting the indentation is accomplished by executing this command from the left-most column. i have bound this command to "C-Q ." i use C-Q for my local functions, and this function is very similar to "C-X ." (set-fill-prefix). (defun set-fill-prefix-all-blanks () (interactive) (setq fill-prefix (make-string (current-column) 32))) -- --derrell (derrell@retix) ------------------------------------------------------------------------------ "The process of living is the process of reacting to stress."