Some edit modes have a specific filename (without any wildcards) as its FILE_NAME_GLOB in the catalog file, because those files always have the same name - e.g. CMakeLists.txt for the cmake mode.
However, this does not seem to function as intended - when I open a file named CMakeLists.txt it ends up using the "text" mode instead of the "cmake" mode.
This happens with custom modes defined in the catalog file in the user's settings dir as well, so the problem does not seem to be limited to that particular edit mode. A bit of testing suggests that modes with a matching FIRST_LINE_GLOB seems to be preferred over exact filename matches, regardless of order, while exact filepath matches work as expected (when the full path to the file (not just its name) is given in the FILE_NAME_GLOB) - but that doesn't help for cases like the CMakeLists.txt file, which can be anywhere.
I've attached an activity log from a run of jedit -nosettings where I opened a CMakeLists.txt file and observed the problem.
This is in jEdit 4.5.2 on Linux, with Java 1.6.0_24, and only the QuickNotepad extension loaded (due to the -nosettings param).
- create a CMakeLists.txt file somewhere (content shouldn't matter)
- open it in jEdit
- check which edit mode is active
Expected result: edit mode should be "cmake"
Actual result: edit mode is "text"