"Kai Großjohann" wrote in message news:84wufgke19.fsf@lucy.is.informatik.uni-duisburg.de... > "Paul Edwards" writes: > > > If I am at the beginning of the "cccc" line and I hit enter, > > emacs is inspired to indent cccc to be under bbbb. I don't > > want that, I want cccc to stay where it is. If I wanted cccc > > to be indented I would do something, e.g. press tab or hit > > spaces. > > Okay, so if the previous line exists and is not blank, then indent > the new line to the previous line after RET. > > Yeah, I'm afraid you'll have to write your own indentation function. > Maybe this one? > > (defun pe-indent-relative () > "Like `indent-relative' but don't indent after blank line." > (when (save-excursion > (and (zerop (forward-line -1)) > (not (looking-at "\s-*$")))) > (indent-relative-maybe))) > > (defun pe-text-setup () > (setq indent-line-function 'pe-indent-relative)) > > (add-hook 'text-mode-hook 'pe-text-setup) > > Maybe it works, but I haven't tested it. This didn't work (had no effect), but am I meant to change the binding of my RET or something like that? Thanks. Paul.