Bug#393669: gedit: automatic syntax highlighting for debian/rules



On Mon, Jan 22, 2007, Sven Arvidsson wrote:
> I took a quick look and gedit uses gtksourceview for syntax
> highlighting, so I reassigned the bug report.
> 
> If you have time, have a look
> at /usr/share/gtksourceview-1.0/language-specs/makefile.lang and see if
> you can figure out how to make it treat debian/rules as a Makefile. 

 I was having a look at the shared-mime-info package, and found a way to
 fix this easily; see the attached patch.

-- 
Loïc Minier <lool dooz org>
diff -Nur shared-mime-info-0.19/freedesktop.org.xml.in shared-mime-info-0.19.new/freedesktop.org.xml.in
--- shared-mime-info-0.19/freedesktop.org.xml.in	2007-01-22 21:56:31.000000000 +0100
+++ shared-mime-info-0.19.new/freedesktop.org.xml.in	2007-01-22 22:01:57.000000000 +0100
@@ -2963,6 +2963,10 @@
     <_comment>Makefile</_comment>
     <glob pattern="[Mm]akefile"/>
     <glob pattern="GNUmakefile"/>
+    <magic priority="50">
+      <match type="string" value="#!/usr/bin/make" offset="0"/>
+      <match type="string" value="#! /usr/bin/make" offset="0"/>
+    </magic>
   </mime-type>
   <mime-type type="text/x-moc">
     <sub-class-of type="text/plain"/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]