Major mode

Hello,

I made a few simplifications on the code, the main visible difference is the use of a major mode derived from special-mode instead of a minor-mode.
I didn't see any reason to use a minor mode instead of a major-mode.

I think some code duplication can still be avoided.