PreviousNextTracker indexSee it online !

(87/240) 3537 - added extensions for a mode don't work

Global Options > jEdit > Editing
I select mode c and change extensions from \*.c to \*.{c,qc,qh}
Changes are applied neither by pressing ok nor by restarting jEdit, even if the settings stay \*.{c,qc,qh}

To workaround this bug I had to manually replace \*.c with \*.{c,qc,qh} in the file jEdit 4.4pre1\modes\catalog.

Windows XP SP3
jEdit 4.4pre1
My settings are in %home%\.jedit

Submitted terencehill - 2011-05-29 13:34:28 Assigned
Priority 5 Labels text area and syntax packages
Status open Group normal bug
Resolution None

Comments

2011-05-29 17:19:29
daleanson

It works fine for me. I set the filename extensions as you did, then renamed a few .c files to have .qc extensions, and jEdit recognizes them as c files when I open them. I wonder if you have a permissions problem? Do you have this line:

mode.c.filenameGlob=\*.{c,qc,qh}

in your %home%\.jedit\properties file?

2011-05-30 11:51:02
terencehill

Yes, mode.c.filenameGlob=\*.{c,qc,qh} is in %home%\.jedit\properties and changes everytime I change the settings in the menu

BTW I played a bit with settings and now, after I restored extensions to \*.c and checked "use default settings" for mode c I can't seem to make work even c syntax for c files... weird.

2011-05-30 11:58:27
*anonymous

"use default settings" means that the editing properties of the mode are changed to the "global defaults" - which means the same settings as text mode.

2011-05-30 12:55:04
daleanson

Do you have a file named c.xml in your %home%\.jedit\modes directory? If so, try removing it.

2011-05-30 14:29:33
terencehill

I created another c.xml in my home directory and then deleted it, but the properties file was still pointing to it :/
I removed the wrong reference to the unexisisting file in properties to fix it.
An explicit warning to the user in this situation would be helpful.

Anyway I finally understood how to actually update the syntax highlighting: the trick is to reload the file manually with the command Reload, otherwise it doesn't work; even closing and reopening the file doesn't (I wonder why).
Maybe this command was needed in my case because I had already opened the qc file in jEdit before the settings changes... don't know.