New indentation code in KDevelop 2
August Hörandl
august.hoerandl at gmx.at
Sat Dec 8 17:52:03 UTC 2001
"Eray Ozkural (exa)" wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Saturday 08 December 2001 12:29, August Hörandl wrote:
> > "Eray Ozkural (exa)" wrote:
> > > This was one of the things that held me back from using kdevelop instead
> > > of emacs. Hope the emacs fans like the new autoindent code.
> >
> > the only better thing would be a k(x)emacs editor part ;-)
> >
>
> Yes, I realized that when I was midway. With the new interfaces it shouldn't
> be that difficult to embed emacs and then communicate using gnuclient (though
> I have no idea how gnuclient is used)
i don't think gnuclient ist the right thing, it uses xemacs in another
window
mybe it should be more like http://www.cs.indiana.edu/elisp/gui-xemacs/
...
> The code is duplicate, because the part that's really duplicate is small, so
> it didn't make much difference.
>
> > if (textLine->getChar(textLine->lastChar())=='}') // closing brace
> > indentPos -= indentLength;
> >
>
> I did only the open brace, but yes, closed brace might be done too. I've got
> to think how that could be done.
>
> That should be firstChar() rather than lastChar() it seems.
>
> Emacs seems to match all braces, parentheses first btw. I don't. So, I have
> to do some dirt.
in emacs that stuff is some 100 lines, and they have functions like
go back over comment
i wrote xemacs indent for a language called chill (a pascal/modula
language -
http://elina.htlw16.ac.at/~hoerandl/chill.html) and i needed almost 200
lines
of lisp code
> > btw: why is that lastchar() ? what about
>
> I was being cheap. Really, can't implement an incremental parser in kdevelop.
>
> > { int x;
> > code;
> >
>
> Arrgh. Tried that, even xemacs does nothing about it. You'll have to hit
> enter from time to time :)
my xemacs indents the second line !?
Gustl
--
August Hörandl august.hoerandl at gmx.at
OSOpinion: Where do I waNT to go today? Not there!
More information about the KDevelop-devel
mailing list