File kate-4.14.3-syntax-erlang.patch of Package kate4-parts

diff -Ndur kate-4.14.3/part/syntax/data/erlang.xml kate-4.14.3-syntax-erlang/part/syntax/data/erlang.xml
--- kate-4.14.3/part/syntax/data/erlang.xml	2014-10-26 22:17:55.000000000 +0200
+++ kate-4.14.3-syntax-erlang/part/syntax/data/erlang.xml	2015-06-06 18:13:27.481575597 +0300
@@ -3,14 +3,15 @@
 [
           <!ENTITY atomstr    "\b[a-z][_a-z@-Z0-9]*(?:(?=[^_a-z@-Z0-9])|$)" >
           <!ENTITY varstr    "\b[_A-Z][_a-z@-Z0-9]*(?:(?=[^_a-z@-Z0-9])|$)" >
+          <!ENTITY macrostr    "\?\b[_A-Z][_a-z@-Z0-9]*(?:(?=[^_a-z@-Z0-9])|$)" >
           <!-- pragmas defined here, because "keyword" can't handle the leading '-' -->
           <!ENTITY pragmas 
-             "^(?:-module|-export|-define|-undef|-ifdef|-ifndef|-else|-endif|-include|-include_lib)" >
+             "^(?:-module|-author|-export|-define|-undef|-ifdef|-ifndef|-else|-endif|-include|-include_lib|-record|-behaviour|-compile|-spec)" >
           <!--  same with separators: (from s3.9 p 24 of erlang spec) -->
           <!ENTITY separators "(?:\(|\)|\{|\}|\[|\]|\.|\:|\||\|\||;|\,|\?|-&gt;|\#)" >
           <!--  and operators - although words are dealt with separately -->
           <!ENTITY opsymbols 
-                   "(?:\+|-|\*|\/|==|\/=|=:=|=\/=|&lt;|=&lt;|&gt;|&gt;=|\+\+|--|=|!|&lt;-)" >
+                   "(?:[+-][^0-9]|\*|\/|==|\/=|=:=|=\/=|&lt;|=&lt;|&gt;|&gt;=|\+\+|--|=|!|&lt;-)" >
 ]
 >
 <!--
@@ -44,16 +45,13 @@
       <item> begin </item>
       <item> case </item>
       <item> catch </item>
-      <item> cond </item>
       <item> end </item>
       <item> fun </item>
       <item> if </item>
-      <item> let </item>
       <item> of </item>
-      <item> query </item>
       <item> receive </item>
-      <item> all_true </item>
-      <item> some_true </item>
+      <item> try </item>
+      <item> when </item>
     </list>
     <list name="operators">
       <!-- operators: s3.9 p 24 of erlang spec -->
@@ -75,8 +73,6 @@
       <!-- all standard (erlang) functions are here, -->
       <!-- except those defined as erlang:function (those will show as functions anyway -->
       <item>abs</item>
-      <item>accept</item>
-      <item>alarm</item>
       <item>apply</item>
       <item>atom_to_list</item>
       <item>binary_to_list</item>
@@ -165,6 +161,7 @@
    </list>
     <contexts>
       <context attribute="Normal Text" lineEndContext="#stay" name="Normal Text" >
+        <RegExpr attribute="Binary" context="#stay" String="&lt;&lt;[^&gt;]*&gt;&gt;" />
         <RegExpr attribute="Pragma" context="#stay" column="0" String="&pragmas;" />
         <keyword attribute="Keyword" context="#stay" String="keywords" />
         <keyword attribute="Operator" context="#stay" String="operators" />
@@ -182,21 +179,28 @@
         <!-- Variables - begin with upper case, or between single quotes -->
         <RegExpr attribute="Variable" context="#stay" String="&varstr;" />
 
+        <!-- Macros - begin with ? -->
+        <RegExpr attribute="Macro" context="#stay" String="&macrostr;" />
+
         <!-- atoms - begin with lower case (letters, numbers, @), 
              or anything between single quotes -->
         <DetectChar attribute="Atom" context="atomquote" char="'" /> 
         <RegExpr attribute="Atom" context="#stay" String="&atomstr;" />
-        
-        <DetectChar attribute="String" context="stringquote" char="&quot;" />
-        
+
+        <DetectChar attribute="String" context="String" char="&quot;" />
+
         <!-- numbers - these work -->
         <!-- integers have three forms 7, 3#22, $A -->
         <!-- float must have a number after the decimal point, or it doesn't count -->
-        <RegExpr attribute="Float" context="#stay" String="[0-9]+\.[0-9]+(?:[eE][+-]?[0-9]+)?" />
+        <RegExpr attribute="Float" context="#stay" String="[+-]?[0-9]+\.[0-9]+(?:[eE][+-]?[0-9]+)?" />
         <RegExpr attribute="Number" context="#stay" String="\d+#[a-zA-Z0-9]+" />
         <RegExpr attribute="Integer" context="#stay" String="\$\S" />
-        <RegExpr attribute="Integer" context="#stay" String="[0-9]+" />
+        <RegExpr attribute="Integer" context="#stay" String="[+-]?[0-9]+" />
+      </context>
 
+      <context name="String" attribute="String" lineEndContext="#stay">
+        <DetectChar char="&quot;" attribute="String" context="#pop"/>
+        <HlCStringChar attribute="String" context="#stay"/>
       </context>
 
       <!-- isfunction -->
@@ -215,7 +219,7 @@
       <context name="stringquote" attribute="String" lineEndContext="#pop">
         <RegExpr attribute="String" context="#pop" String="(?:(?:\\&quot;)?[^&quot;]*)*&quot;" />
       </context>
-      
+
       <!-- finish off the comment (allows for alerts) -->
       <context name="comment" attribute="Comment" lineEndContext="#pop">
         <DetectSpaces />
@@ -232,11 +236,13 @@
       <itemData name="Separator"                 defStyleNum="dsFunction" />
       <itemData name="Operator"                  defStyleNum="dsKeyword"  />
       <itemData name="Variable"                  defStyleNum="dsDataType" />
+      <itemData name="Macro"                     defStyleNum="dsDataType" />
       <itemData name="Integer"                   defStyleNum="dsDecVal" />
       <itemData name="Number"                    defStyleNum="dsBaseN" />
       <itemData name="Float"                     defStyleNum="dsFloat" />
       <itemData name="Atom"                      defStyleNum="dsChar" />
       <itemData name="String"                    defStyleNum="dsString" />
+      <itemData name="Binary"                    defStyleNum="dsString" />
       <itemData name="Comment"                   defStyleNum="dsComment" />
     </itemDatas>
   </highlighting>
openSUSE Build Service is sponsored by