New indentation code in KDevelop 2
Eray Ozkural (exa)
erayo at cs.bilkent.edu.tr
Sat Dec 8 19:30:06 UTC 2001
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday 08 December 2001 18:51, August Hörandl wrote:
> 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/
>
> ...
>
Uh, I didn't know about that. Hmm, that's the xemacs-gtk that we all tried. :)
But that's GTK, we can't possibly use it, it wouldn't look good and it would
bring too much bloat/dependencies.
Porting that to Qt/KDE is way too much work for me but let this post be a
reminder for all those interested ;)
Now that there _is_ a C binding it might be much more easier to replace all
those gtk-isms, who knows?
> > 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
>
That's not too much, but it would explode to something like 500 lines of C++
code. It's a functional language we're talking about.
There is some paren checking code in kdevelop 2 BTW, it might be very easy to
pull it off if I used it.
> 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
>
What features do you have there I wonder. I guess you were referring to the
C/C++ indentation code in the previous paragraph.
> > 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 !?
>
Ah, okay I get your point. I thought you would like the parser to indent it to
{
int x;
code;
which would require an incremental parser. (That's a nice design experiment
for you kdevelop fans out there!)
To do that I ought t' be checking firstChar() as well as lastChar() for
opening brace.
Though, that doesn't strike me like a familiar style. Perhaps no need to
support it? Show me some code that has indentation like that :)
Thanks,
- --
Eray Ozkural (exa) <erayo at cs.bilkent.edu.tr>
Comp. Sci. Dept., Bilkent University, Ankara
www: http://www.cs.bilkent.edu.tr/~erayo
GPG public key fingerprint: 360C 852F 88B0 A745 F31B EA0F 7C07 AE16 874D 539C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8EltpfAeuFodNU5wRAuYtAJwMN+msK6445ZdMN2rMvZrhNOBGBgCfc1Ed
qUXEC18pLSi4SJdLXbHWnvc=
=eI6+
-----END PGP SIGNATURE-----
More information about the KDevelop-devel
mailing list