[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 113567] New: Add function name highlighting for C
From:       Nick Thompson <nickthompson () agere ! com>
Date:       2005-09-29 12:56:26
Message-ID: 20050929145619.113567.nickthompson () agere ! com
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=113567         
           Summary: Add function name highlighting for C
           Product: kate
           Version: unspecified
          Platform: unspecified
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: general
        AssignedTo: coolo kde org
        ReportedBy: nickthompson agere com


Version:           2.4.91 (using KDE 3.4.91 (beta1, >= 20050910), compiled sources)
Compiler:          gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-42)
OS:                Linux (i686) release 2.4.21-20.ELsmp

I thought it might be useful to add highlighting of function names in 'C'. Thanks to \
the XML definitions this is easy. It follows exactly the same form as the java \
equivalent:

*** c.xml       Sat Sep 10 09:26:35 2005
--- /home/nickthom/.kde/share/apps/katepart/syntax/c.xml        Thu Sep 29 13:36:21 \
                2005
***************
*** 52,57 ****
--- 52,58 ----
          <StringDetect attribute="Region Marker" context="Region Marker" \
String="//END" endRegion="Region1" firstNonSpace="true" />  <keyword \
attribute="Keyword" context="#stay" String="keywords"/>  <keyword attribute="Data \
Type" context="#stay" String="types"/> +         <RegExpr attribute="Function" \
context="#stay" String="\b[_\w][_\w\d]*(?=[\s]*(/\*\s*\d+\s*\*/\s*)?[(])" />  \
                <DetectIdentifier />
          <DetectChar attribute="Symbol" context="#stay" char="{" \
                beginRegion="Brace1" />
          <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" \
                />
***************
*** 121,126 ****
--- 122,128 ----
      <itemDatas>
        <itemData name="Normal Text"  defStyleNum="dsNormal"/>
        <itemData name="Keyword"      defStyleNum="dsKeyword"/>
+       <itemData name="Function"     defStyleNum="dsFunction"/>
        <itemData name="Data Type"    defStyleNum="dsDataType"/>
        <itemData name="Decimal"      defStyleNum="dsDecVal"/>
        <itemData name="Octal"        defStyleNum="dsBaseN"/>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic