[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: simple editor required
From: |
Paul Edwards |
Subject: |
Re: simple editor required |
Date: |
Mon, 23 Jun 2003 10:46:39 GMT |
"Kai Großjohann" <kai.grossjohann@gmx.net> wrote in message
84wufgke19.fsf@lucy.is.informatik.uni-duisburg.de">news:84wufgke19.fsf@lucy.is.informatik.uni-duisburg.de...
> "Paul Edwards" <kerravon@nosppaam.w3.to> 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.
- Re: simple editor required, (continued)
- Re: simple editor required, Paul Edwards, 2003/06/24
- Re: simple editor required, Kai Großjohann, 2003/06/24
- Re: simple editor required, Paul Edwards, 2003/06/24
- Re: simple editor required, Stefan Monnier, 2003/06/24
- Re: simple editor required, Paul Edwards, 2003/06/25
- Re: simple editor required, Kai Großjohann, 2003/06/25
- Message not available
- Re: simple editor required, Paul Edwards, 2003/06/25
- Re: simple editor required, Kai Großjohann, 2003/06/25
- Re: simple editor required, Paul Edwards, 2003/06/30
- Re: simple editor required, Kai Großjohann, 2003/06/20
- Re: simple editor required,
Paul Edwards <=
- Re: simple editor required, Kai Großjohann, 2003/06/23
- Re: simple editor required, Paul Edwards, 2003/06/23
- Re: simple editor required, Kai Großjohann, 2003/06/24
- Re: simple editor required, Kai Großjohann, 2003/06/17
- Re: simple editor required, Paul Edwards, 2003/06/18
- Re: simple editor required, Stefan Monnier, 2003/06/19
- Re: simple editor required, Paul Edwards, 2003/06/17
- Re: simple editor required, Stefan Monnier, 2003/06/17
- Re: simple editor required, Paul Edwards, 2003/06/18
- Re: simple editor required, Kai Großjohann, 2003/06/18