I noticed a few programming modes not derived from prog-mode. I have attached a patch. Maybe gdb-script-mode and ld-script-mode also need this treatment. I was unsure.