Version: (using KDE 4.3.2)
Installed from: Ubuntu Packages
When opening Prolog files (which share the .pl extension with Perl), the code is by default highlighted as if it were Perl.
1. Create a file named "test.pl" with content like:
%This is Prolog!
%And it's really fun when you start adding apostrophes!
mammal(X) :- cat(X).
2. Open file in Kate, syntax highlighting is completely off. User must traverse quite the menu structure to get it to highlight correctly and must do so for every file if she opened a lot of Prolog files.
Syntax highlighting defaults to Prolog for Prolog files.
Having the same file extension is bad. Does a mimetype exist for prolog files? Kate used additionally to the file extension the KDE mimetype system for determing what kind of file it is dealing with.
You can increase the priority of the highlighting so that it is favoured in the highlighting configuration.
Editor Component -> Open/Save -> Modes Filetypes -> Sources/Prolog
There you can add the .pl Extension and increase the priority
It seems KDE recognizes the files as Perl files (application/x-perl), which is also what xdg-mime gives (not sure that is relevant though).
I believe the correct mime type should be "text/x-prolog".
Perhaps I should just start giving my files .prolog extensions. I don't think that's the convention though, I've never encountered it before.
Manually adding the extension seems to fix most problems. Although I probably shouldn't try editing Perl files now. :)
:) Anyway, nothing kate can fix, if the mimetypes don't get fixed.