Bug 60728 - C++ header files do not use cpp.xml syntax highlighting
Summary: C++ header files do not use cpp.xml syntax highlighting
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-04 07:56 UTC by Christian
Modified: 2003-07-24 12:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian 2003-07-04 07:56:29 UTC
Version:            (using KDE KDE 3.1)
Installed from:    RedHat RPMs
Compiler:          gcc 3.2 
OS:          Linux

Hi, The settings I specify under Highlight Modes on the 'Configure Kate' dialog box for C++ are only applied to *.cpp sources. E.g. I set 'Normal Text' = bold, text in *.h files are still regular size, unless I select bold for 'Normal Text' under the 'Default Styles'.

Top lines of cpp.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="C++" version="1.03" kateversion="2.1" section="Sources" extensions="*.cxx;*.cpp;*.cc;*.C;*.h" mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr">
Comment 1 Christian Loose 2003-07-05 00:13:06 UTC
I can confirm this bug for KDE HEAD. 
 
kdelibs 07/02/2003 19:10 GMT 
kdebase 07/03/2003 18:42 GMT 
 
Bye 
 
Christian L. 
Comment 2 Anders Lund 2003-07-05 10:06:47 UTC
Subject: Re:  New: C++ header files do not use cpp.xml syntax highlighting

On Friday 04 July 2003 07:56, Christian wrote:
> Hi, The settings I specify under Highlight Modes on the 'Configure Kate'
> dialog box for C++ are only applied to *.cpp sources. E.g. I set 'Normal
> Text' = bold, text in *.h files are still regular size, unless I select
> bold for 'Normal Text' under the 'Default Styles'.
>
> Top lines of cpp.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE language SYSTEM "language.dtd">
> <language name="C++" version="1.03" kateversion="2.1" section="Sources"
> extensions="*.cxx;*.cpp;*.cc;*.C;*.h"
> mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr">

At least in HEAD there is a priority option, which is used when the mime type 
is [word i can't remember, undecided cause more is possible]

The default priority for c++ is set to 9 (which i high) because we are in a 
c++ environment.

There was some discussion about how to handle it, personally I still feel that 
a content based analysis should weigh more than a user set priority, even it 
is slower. Jowenn?

-anders

Comment 3 Christoph Cullmann 2003-07-17 08:48:05 UTC
problem is how to decide  if the user wants cpp or c, that  can't be really done
right, k, as soon as you can detect some class you could say is cpp, but could
be a failure, other way around same, even if only plain c, could be a cpp
include, the priority lets the user decide which type should come up in the
conflict cases, think that is good enough atm

apart from that: isn't cpp allready used for .h files per default atm ?
Comment 4 Christian Loose 2003-07-17 19:28:29 UTC
Yes, I agree. The priority is good enough.  
 
The problem is (for me) that at the moment the header files don't have syntax 
highlightning at all. Neither cpp nor c. Is something wrong with my setup? 
 
Please don't hesitate to ask for more information. 
 
Christian 
Comment 5 Christoph Cullmann 2003-07-20 22:24:52 UTC
hmm, perhaps not the right mimetypes there on your machine, but even in that case 
the hl should use the patterns for the file endings, no idea, I will close that bug as this 
problem is solved, if you need more help with the hl, please mail to kwrite-devel@kde.
org, but guess only temporary bug, but no idea why, really :/ 
 
Comment 6 Christian Loose 2003-07-24 12:41:30 UTC
Okay I found out what the problem was. Both, c++ and c highlighting, had 
priority 0 (don't know how that happened), so the c highlighting was selected. 

For some strange reason, my c highlighting had defined black color for all 
parts, so it looked like there was no syntax highlighting at all.

I now increased the priority for c++ and it works. :-)

Christian