diff --git a/Makefile.am b/Makefile.am
index cdb1c28..dc97338 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,6 +15,7 @@ bin_SCRIPTS = \
 	gtkdoc-scan     \
 	gtkdoc-scangobj \
 	gtkdoc-scanobj  \
+	gtkdoc-syntax   \
 	gtkdocize
 
 if HAVE_PYTHON
@@ -25,6 +26,8 @@ endif
 gtkdocdatadir = $(datadir)/gtk-doc/data
 gtkdocdata_DATA = \
 	gtkdoc-common.pl	\
+	gtkdoc-highlight.pm	\
+	c.syn			\
 	gtk-doc.dsl		\
 	gtk-doc.dcl		\
 	gtk-doc.xsl		\
diff --git a/configure.ac b/configure.ac
index c2a90e3..7fb602f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,33 +96,6 @@ JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.3//EN], [DocBook XML DTD V4.3
 JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl], [DocBook XSL Stylesheets])
 
 dnl
-dnl Check for syntax highlighters
-dnl
-HIGHLIGHT_OPTIONS=""
-AC_PATH_PROG([HIGHLIGHT], [source-highlight])
-if test -n "$HIGHLIGHT"; then
-	HIGHLIGHT_OPTIONS="-t4 -sc -cstyle.css --no-doc -i"
-else
-	AC_PATH_PROG([HIGHLIGHT], [highlight])
-	if test -n "$HIGHLIGHT"; then
-		HIGHLIGHT_OPTIONS="-X -f --class-name=gtkdoc "
-	else
-		AC_PATH_PROG([HIGHLIGHT], [vim])
-		if test -n "$HIGHLIGHT"; then
-			dnl vim is useless if it does not support syntax highlighting
-			AC_MSG_CHECKING([whether vim has +syntax feature])
-			if $HIGHLIGHT --version | grep '+syntax' >/dev/null; then
-				AC_MSG_RESULT([yes])
-			else
-				AC_MSG_RESULT([no])
-				HIGHLIGHT=
-			fi
-		fi
-	fi
-fi
-AC_SUBST([HIGHLIGHT_OPTIONS])
-
-dnl
 dnl Set PACKAGE_DATA_DIR so we can find the script containing common routines.
 dnl
 dnl From Autoconf Macro Archive:
@@ -219,6 +192,7 @@ AC_CONFIG_FILES([gtkdoc-rebase],   [chmod +x gtkdoc-rebase])
 AC_CONFIG_FILES([gtkdoc-scan],     [chmod +x gtkdoc-scan])
 AC_CONFIG_FILES([gtkdoc-scangobj], [chmod +x gtkdoc-scangobj])
 AC_CONFIG_FILES([gtkdoc-scanobj],  [chmod +x gtkdoc-scanobj])
+AC_CONFIG_FILES([gtkdoc-syntax],   [chmod +x gtkdoc-syntax])
 AC_CONFIG_FILES([gtkdocize],       [chmod +x gtkdocize])
 AC_CONFIG_FILES([tests/tools.sh],  [chmod +x tests/tools.sh])
 AC_OUTPUT
@@ -242,9 +216,6 @@ test "x$gdu_cv_have_gdu" = "xyes" \
 test "x$enable_scrollkeeper" = "xyes" \
     && AC_MSG_NOTICE([** Scrollkeeper support enabled]) \
     || AC_MSG_NOTICE([   Scrollkeeper support disabled])
-test -n "$HIGHLIGHT" \
-    && AC_MSG_NOTICE([** Syntax highlighting of examples enabled, using $HIGHLIGHT]) \
-    || AC_MSG_NOTICE([   Syntax highlighting of examples disabled])
 test "x$build_tests" != "xno" \
     && AC_MSG_NOTICE([** Building regression tests]) \
     || AC_MSG_NOTICE([   Skipping regression tests])
diff --git a/gtk-doc.m4 b/gtk-doc.m4
index 2cfa1e7..283cf6a 100644
--- a/gtk-doc.m4
+++ b/gtk-doc.m4
@@ -12,6 +12,7 @@ AC_DEFUN([GTK_DOC_CHECK],
   dnl check for tools we added during development
   AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
   AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
+  AC_PATH_PROGS([GTKDOC_SYNTAX],[gtkdoc-syntax],[true])
   AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
 
   dnl for overriding the documentation installation directory
diff --git a/gtk-doc.notmpl.make b/gtk-doc.notmpl.make
index 2baab5c..addc34d 100644
--- a/gtk-doc.notmpl.make
+++ b/gtk-doc.notmpl.make
@@ -84,6 +84,7 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
                test -f $$i || touch $$i ; \
 	    done \
 	fi
+	$(GTKDOC_SYNTAX) $(SYNTAX_CONFIG) $(DOC_MODULE)-decl.txt >$(DOC_MODULE).syn
 	@touch scan-build.stamp
 
 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
@@ -146,7 +147,7 @@ clean-local:
 
 distclean-local:
 	cd $(srcdir) && \
-	  rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \
+	  rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf $(DOC_MODULE).syn \
 	         $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
 
 maintainer-clean-local: clean
@@ -167,6 +168,9 @@ install-data-local:
 	    echo '-- Installing '$$i ; \
 	    $(INSTALL_DATA) $$i $${installdir}; \
 	  done; \
+	  if test -f "$(DOC_MODULE).syn"; then \
+	    $(INSTALL_DATA) $(DOC_MODULE).syn $${installdir}; \
+	  fi; \
 	  if test -n "$(DOC_MODULE_VERSION)"; then \
 	    mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
 	      $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
diff --git a/gtkdoc-fixxref.in b/gtkdoc-fixxref.in
index 786770a..f910966 100755
--- a/gtkdoc-fixxref.in
+++ b/gtkdoc-fixxref.in
@@ -30,6 +30,8 @@ use Getopt::Long;
 
 push @INC, '@PACKAGE_DATA_DIR@';
 require "gtkdoc-common.pl";
+require "gtkdoc-highlight.pm";
+import GtkDocHighlight;    # Imports AddHighlightSymbols and HighlightC
 
 # Options
 
@@ -105,6 +107,9 @@ if (!defined $MODULE_DIR) {
   $MODULE_DIR="$HTML_DIR/$MODULE";
 }
 
+&AddHighlightSymbols('@PACKAGE_DATA_DIR@/c.syn');
+if (defined $MODULE and -f "$MODULE.syn") { &AddHighlightSymbols("$MODULE.syn") }
+
 my $dir;
 
 # We scan the directory containing GLib and any directories in GNOME2_PATH
@@ -223,6 +228,8 @@ sub ScanIndices {
 	    push (@subdirs, $file);
 	} elsif ($file eq "index.sgml") {
 	    &ScanIndex ("$scan_dir/$file", $use_absolute_links);
+	} elsif ($file =~ m/\.syn\$/) {
+	    &AddHighlightSymbols($file);
 	}
         # ubuntu started to compress this as index.sgml.gz :/
         # https://bugs.launchpad.net/ubuntu/+source/gtk-doc/+bug/77138
@@ -290,23 +297,24 @@ sub FixHTMLFile {
     my $entire_file = <HTMLFILE>;
     close (HTMLFILE);
     
-    if ("@HIGHLIGHT@" ne "") {
-        if ("@HIGHLIGHT@" =~ m%/vim$%) {
-            $entire_file =~ s%<div class=\"(example-contents|informalexample)\"><pre class=\"programlisting\">(.*?)</pre></div>%&HighlightSourceVim($1,$2);%gse;
-        }
-        else {
-            $entire_file =~ s%<div class=\"(example-contents|informalexample)\"><pre class=\"programlisting\">(.*?)</pre></div>%&HighlightSource($1,$2);%gse;
-        }
-        # this just broke existing GTKDOCLINK tags
-        # &lt;GTKDOCLINK HREF=&quot;GST-PAD-SINK:CAPS&quot;&gt;GST_PAD_SINK&lt;/GTKDOCLINK&gt;
-        $entire_file =~ s%\&lt;GTKDOCLINK\s+HREF=\&quot;(.*?)\&quot;\&gt;(.*?)\&lt;/GTKDOCLINK\&gt;%\<GTKDOCLINK\ HREF=\"$1\"\>$2\</GTKDOCLINK\>%gs;
-        
-        # from the highlighter we get all the functions marked up
-        # now we could turn them into GTKDOCLINK items
-        $entire_file =~ s%(<span class=\"function\">)(.*?)(</span>)%&MakeGtkDocLink($1,$2,$3);%gse;
-        # we could also try the first item in stuff marked up as 'normal'
-        $entire_file =~ s%(<span class=\"normal\">\s*)(.+?)((\s+.+?)?\s*</span>)%&MakeGtkDocLink($1,$2,$3);%gse;
-    }
+    # XXX: I find the linkification of stuff in examples very disrupting.
+    # It would be much nicer if the examples were not linkified -- with the
+    # benefit that nothing would break inside then.  (Yeti)
+    $entire_file =~ s%<div class=\"(example-contents|informalexample)\"><pre class=\"programlisting\">(.*?)</pre></div>%&HighlightSource($1,$2);%gse;
+    # this just broke existing GTKDOCLINK tags
+    # &lt;GTKDOCLINK HREF=&quot;GST-PAD-SINK:CAPS&quot;&gt;GST_PAD_SINK&lt;/GTKDOCLINK&gt;
+    $entire_file =~ s%\&lt;GTKDOCLINK\s+HREF=\&quot;(.*?)\&quot;\&gt;(.*?)\&lt;/GTKDOCLINK\&gt;%\<GTKDOCLINK\ HREF=\"$1\"\>$2\</GTKDOCLINK\>%gs;
+
+    # XXX: I find the linkification of stuff in examples very disrupting.
+    # Also, `normal' was probably a poor excuse for `type'.  There are no silly
+    # `normal' <span>s anymore, normal is simply unmakred, so if you mean
+    # `type' use `type'.  (Yeti)
+    #
+    # from the highlighter we get all the functions marked up
+    # now we could turn them into GTKDOCLINK items
+    # $entire_file =~ s%(<span class=\"function\">)(.*?)(</span>)%&MakeGtkDocLink($1,$2,$3);%gse;
+    # we could also try the first item in stuff marked up as 'normal'
+    # $entire_file =~ s%(<span class=\"normal\">\s*)(.+?)((\s+.+?)?\s*</span>)%&MakeGtkDocLink($1,$2,$3);%gse;
 
     my @lines = split(/\n/, $entire_file);
     for (my $i=0; $i<$#lines; $i++) {
@@ -380,18 +388,18 @@ sub MakeXRef {
 }
 
 
-sub MakeGtkDocLink {
-    my ($pre,$symbol,$post) = @_;
-
-    my $id=CreateValidSGMLID($symbol);
-
-    # these are implicitely created links in highlighed sources
-    # we don't want warnings for those if the links cannot be resolved.
-    $NoLinks{$id} = 1;
-
-    #return "<span class=\"$type\"><GTKDOCLINK HREF=\"$id\">$symbol</GTKDOCLINK></span>";
-    return "$pre<GTKDOCLINK HREF=\"$id\">$symbol</GTKDOCLINK>$post";
-}
+#sub MakeGtkDocLink {
+#    my ($pre,$symbol,$post) = @_;
+#
+#    my $id=CreateValidSGMLID($symbol);
+#
+#    # these are implicitely created links in highlighed sources
+#    # we don't want warnings for those if the links cannot be resolved.
+#    $NoLinks{$id} = 1;
+#
+#    #return "<span class=\"$type\"><GTKDOCLINK HREF=\"$id\">$symbol</GTKDOCLINK></span>";
+#    return "$pre<GTKDOCLINK HREF=\"$id\">$symbol</GTKDOCLINK>$post";
+#}
 
 
 sub HighlightSource {
@@ -408,99 +416,7 @@ sub HighlightSource {
     $source =~ s/&gt;/>/g;
     $source =~ s/&amp;/&/g;
 
-    # write source to a temp file
-    # FIXME: use .c for now to hint the language to the highlighter
-    my $temp_source_file="$MODULE_DIR/_temp_src.$$.c";
-    open (NEWFILE, ">$temp_source_file") || die "Can't open $temp_source_file: $!";
-    print NEWFILE $source;
-    close (NEWFILE);
-    
-    #print" running @HIGHLIGHT@ @HIGHLIGHT_OPTIONS@$temp_source_file \n";
-    
-    # format source
-    my $highlighted_source=`@HIGHLIGHT@ @HIGHLIGHT_OPTIONS@$temp_source_file`;
-    if ("@HIGHLIGHT@" =~ m%/source-highlight$%) {
-        $highlighted_source =~ s%^<\!-- .*? -->%%gs;
-        $highlighted_source =~ s%<pre><tt>(.*?)</tt></pre>%$1%gs;
-    }
-    elsif ("@HIGHLIGHT@" =~ m%/highlight$%) {
-        # need to rewrite the stylesheet classes
-        $highlighted_source =~ s%<span class="gtkdoc com">%<span class="comment">%gs;
-        $highlighted_source =~ s%<span class="gtkdoc dir">%<span class="preproc">%gs;
-        $highlighted_source =~ s%<span class="gtkdoc kwd">%<span class="function">%gs;
-        $highlighted_source =~ s%<span class="gtkdoc kwa">%<span class="keyword">%gs;
-        $highlighted_source =~ s%<span class="gtkdoc line">%<span class="linenum">%gs;
-        $highlighted_source =~ s%<span class="gtkdoc num">%<span class="number">%gs;
-        $highlighted_source =~ s%<span class="gtkdoc str">%<span class="string">%gs;
-        $highlighted_source =~ s%<span class="gtkdoc sym">%<span class="symbol">%gs;
-        # maybe also do
-        # $highlighted_source =~ s%</span>(.+)<span%</span><span class="normal">$1</span><span%gs;
-    }
-    # remove temp file
-    unlink ($temp_source_file)
-	|| die "Can't delete $temp_source_file: $!";
-
-    return &HighlightSourcePostprocess($type, $highlighted_source);
-}
-
-sub HighlightSourceVim {
-    my ($type, $source) = @_;
-
-    # chop of leading and trailing empty lines
-    $source =~ s/^[\s\n]+//gs;
-    $source =~ s/[\s\n]+$//gs;
-    # avoid double entity replacement
-    $source =~ s/&lt;/</g;
-    $source =~ s/&gt;/>/g;
-    $source =~ s/&amp;/&/g;
-
-    # write source to a temp file
-    my $temp_source_file="$MODULE_DIR/_temp_src.$$.h";
-    open (NEWFILE, ">$temp_source_file") || die "Can't open $temp_source_file: $!";
-    print NEWFILE $source;
-    close (NEWFILE);
-
-    # format source
-    system "echo 'let html_number_lines=0|let html_use_css=1|let use_xhtml=1|syn on|e $temp_source_file|run! syntax/2html.vim|wa!|qa!' | @HIGHLIGHT@ -n -e -u /dev/null -T xterm >/dev/null";
-
-    my $highlighted_source;
-    {
-        local $/;
-        open (NEWFILE, "<$temp_source_file.html");
-        $highlighted_source = <NEWFILE>;
-        close (NEWFILE);
-    }
-    $highlighted_source =~ s#.*<pre>\n##s;
-    $highlighted_source =~ s#</pre>.*##s;
-
-    # need to rewrite the stylesheet classes
-    # FIXME: Vim has somewhat different syntax groups
-    $highlighted_source =~ s%<span class="Comment">%<span class="comment">%gs;
-    $highlighted_source =~ s%<span class="PreProc">%<span class="preproc">%gs;
-    $highlighted_source =~ s%<span class="Statement">%<span class="keyword">%gs;
-    $highlighted_source =~ s%<span class="Identifier">%<span class="function">%gs;
-    $highlighted_source =~ s%<span class="Constant">%<span class="number">%gs;
-    $highlighted_source =~ s%<span class="Special">%<span class="symbol">%gs;
-    $highlighted_source =~ s%<span class="Type">%<span class="type">%gs;
-
-    # remove temp files
-    unlink ($temp_source_file)
-	|| die "Can't delete $temp_source_file: $!";
-    unlink ("$temp_source_file.html")
-	|| die "Can't delete $temp_source_file.html: $!";
-
-    return &HighlightSourcePostprocess($type, $highlighted_source);
-}
-
-sub HighlightSourcePostprocess {
-    my ($type, $highlighted_source) = @_;
-
-    # chop of leading and trailing empty lines
-    $highlighted_source =~ s/^[\s\n]+//gs;
-    $highlighted_source =~ s/[\s\n]+$//gs;
-
-    # turn common urls in comments into links
-    $highlighted_source =~ s%<span class="url">(.*?)</span>%<span class="url"><a href="$1">$1</a></span>%gs;
+    my $highlighted_source = &HighlightC($type, $source);
 
     # we do own line-numbering
     my $source_lines="";
diff --git a/style.css b/style.css
index 82115eb..08770cb 100644
--- a/style.css
+++ b/style.css
@@ -211,19 +211,18 @@ h2 .extralinks, h3 .extralinks
 
 /* code listings */
 
-.listing_code .programlisting .cbracket   { color: #a40000; } /* tango: scarlet red 3 */
-.listing_code .programlisting .comment    { color: #a1a39d; } /* tango: aluminium 4 */
-.listing_code .programlisting .function   { color: #000000; font-weight: bold; }
-.listing_code .programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */
-.listing_code .programlisting .keyword    { color: #4e9a06; } /* tango: chameleon 3  */
+.listing_code .programlisting .comment    { color: #555753; } /* tango: slate 2 */
+.listing_code .programlisting .function   { color: #c4a000; } /* tango: butter 3 */
+.listing_code .programlisting .function a { color: #c4a000; } /* tango: butter 3 */
+.listing_code .programlisting .keyword    { color: #8f5902; font-weight: bold;  } /* tango: chocolate 3  */
 .listing_code .programlisting .linenum    { color: #babdb6; } /* tango: aluminium 3 */
-.listing_code .programlisting .normal     { color: #000000; }
-.listing_code .programlisting .number     { color: #75507b; } /* tango: plum 2 */
-.listing_code .programlisting .preproc    { color: #204a87; } /* tango: sky blue 3  */
-.listing_code .programlisting .string     { color: #c17d11; } /* tango: chocolate 2 */
-.listing_code .programlisting .type       { color: #000000; }
-.listing_code .programlisting .type a     { color: #11326b; } /* tango: sky blue 4 */
-.listing_code .programlisting .symbol     { color: #ce5c00; } /* tango: orange 3 */
+.listing_code .programlisting .constant   { color: #f57900; } /* tango: orange 2 */
+.listing_code .programlisting .preproc    { color: #75507b; } /* tango: plum 2  */
+.listing_code .programlisting .string     { color: #ef2929; } /* tango: scarlet red 1 */
+.listing_code .programlisting .type       { color: #4e9a06; font-weight: bold; } /* tango: chameleon 3 */
+.listing_code .programlisting .type a     { color: #4e9a06; font-weight: bold;  } /* tango: chameleon 3 */
+.listing_code .programlisting .special    { color: #204a87; } /* tango: sky blue 3 */
+.listing_code .programlisting .deprecated { color: #ffffff; background-color: #a40000; } /* tango: scarlet red 3 */
 
 .listing_frame {
   /* tango:sky blue 1 */
diff --git a/tests/gobject/docs/tester.types b/tests/gobject/docs/tester.types
index b4b6cea..329d4ff 100644
--- a/tests/gobject/docs/tester.types
+++ b/tests/gobject/docs/tester.types
@@ -1,4 +1,4 @@
-#include <tester.h>
-
-gtkdoc_object_get_type
+gtkdoc_boxed_get_type
+gtkdoc_enum_get_type
 gtkdoc_iface_get_type
+gtkdoc_object_get_type
diff --git a/tests/gtk-doc.notmpl.make b/tests/gtk-doc.notmpl.make
index 5d14053..51ac017 100644
--- a/tests/gtk-doc.notmpl.make
+++ b/tests/gtk-doc.notmpl.make
@@ -72,6 +72,7 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
                test -f $$i || touch $$i ; \
 	    done \
 	fi
+	 PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) gtkdoc-syntax $(SYNTAX_CONFIG) $(DOC_MODULE)-decl.txt >$(DOC_MODULE).syn
 	@touch scan-build.stamp
 
 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
@@ -135,7 +136,7 @@ clean-local:
 
 distclean-local:
 	@cd $(srcdir) && \
-	  rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \
+	  rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf $(DOC_MODULE).syn \
 	         $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
 
 maintainer-clean-local: clean
