> -----Original Message-----
> From: MDK
> To: jed-users-l@xxxxxxxxxxxxxx
> Subject: C# mode
>
> Hello,
>
> goes anybody has a C# mode for Jed ready? I made myself a (simple) one
> by extending the CMode (adding some keywords, etc.). Just thought
> maybe someone has something better already. I'm also interested in a
> modified CMode to support some common glib stuff (gint, gboolean,
> g_assert...).
Hi,
Well, extending the C mode (as does java mode) seems to me the way to go, as
you get a correct indentation for free.
I wrote a simple C# mode as a modified java mode.
It's attached, maybe it can help you a bit.
as for the glib extension, it seems to me that the only thing needed are
more keywords... if so, you add to your .jedrc:
define c_mode_hook()
{
variable mode = "C";
()= define_keywords_n(mode, "gint", 4, 2);
()= define_keywords_n(mode, "gcharguint", 5, 2);
()= define_keywords_n(mode, "gboolean", 8, 2);
% etc...
}
You may also need to define a nice-looking color for "keyword2".
the hard work is to collect all the keywords and write those
'define_keywords_n' lines.
Hope this helps,
Dino
Attachment:
csmode.sl
Description: Binary data