Re: editor with syntax highlighting for GTK+/GNOME API
- From: Paul Davis <pbd Op Net>
- To: Taybin Rutkin <trutkin physics clarku edu>
- Cc: gtk-list gnome org
- Subject: Re: editor with syntax highlighting for GTK+/GNOME API
- Date: Wed, 27 Jun 2001 15:34:39 -0400
>> >Thanks Alfons,
>> >but it doesnt hightlight GTK+/GNOME API, it does for regular C, etc.
>>
>> the GTK+ and GNOME API's are written in C. what on earth does it mean
>> to "highlight" the API of a particular library?
>
>I know what he's asking for. I used to use a basic editor for the
>macintosh called FutureBasic that highlight all the macintosh system calls
>as well as the reserved words.
OK. For emacs:
(font-lock-add-keywords
'c-mode
'(("gtk_widget_new" 1 font-lock-function-name-face t)
("gtk_widget_whatever" 1 font-lock-function-name-face t)
....
("GtkWidget" 1 font-lock-keyword-face t)
("GtkFrame" 1 font-lock-keyword-face t)
....
))
By using etags to build a list of function names, then sed/awk/perl to
transform this into an elisp statement like the one above, the job
could be done extremely quickly.
I don't know how quick emacs would handle this for a library with
hundreds of functions but I imagine it would work pretty well.
--p (who prefers his source code raw, not burnt to a multicolored crisp)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]