[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: |
Wed, 25 Jun 2003 07:47:37 GMT |
"Kai Großjohann" <kai.grossjohann@gmx.net> wrote in message
843chyfzpp.fsf@lucy.is.informatik.uni-duisburg.de">news:843chyfzpp.fsf@lucy.is.informatik.uni-duisburg.de...
> > Is there any mode I can switch too, where I can get the behaviour
> > I want, without it making a whole set of new problems for me
> > (e.g. automatic assumptions about C coding style). The only
> > assumption I want is that it is indented text, so if the previous
> > line started in column 16, then the cursor should be positioned
> > there when I start a new line.
>
> Well, recent versions of CC mode have the variable
> c-syntactic-indentation that you can set to nil from a mode hook:
>
> (defun paul-c-setup ()
> (setq c-syntactic-indentation nil))
> (add-hook 'c-mode-hook 'paul-c-setup)
>
> I won't be all that different from text mode, but you can get syntax
> highlighting. Maybe you will like that.
I don't need syntax highlighting, what I need is indent to work
logically. Is cc's indenting more logical?
Anyway, I have the results of the most recent testing.
> Use M-x debug-on-entry RET to find out if the pe-indent-relative
> indentation function is ever called.
Yes it is.
Then I replaced that with the new one...
> (defun pe-newline-and-maybe-indent ()
> (interactive)
> (if (bolp) (newline) (newline-and-indent)))
And this one appears to do exactly what I want. Thanks for
helping me get this sorted.
I guess while I'm on a roll I should see if I can get xemacs to
behave like emacs, so that next time I'm on a site with xemacs
only, I can get it to behave as logically as emacs (now) does! :-)
BFN. Paul.
- Re: simple editor required, (continued)
- Re: simple editor required, Paul Edwards, 2003/06/23
- Re: simple editor required, Stefan Monnier, 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, 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 <=
- 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, 2003/06/23
- 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