The recommended way to define a new major mode is to derive it from an existing one
using define-derived-mode. If there is no closely related mode, you should inherit from
either text-mode, special-mode, or prog-mode. See Basic Major Modes. If none of
these are suitable, you can inherit from fundamental-mode (see Major Modes).
special-mode doesn't add much behavior-wise; it's mostly just about convention. E.g., some tools enable/disable certain keybindings or hooks in special mode. My motivation for this PR is to have god-mode automatically disable itself in the *pomidor* buffer without having to special-case it. (god-mode disables itself in modes derived from special-mode automatically)
It also provides a central point (special-mode-map) for users to define their own keybindings for modes that aren't about editing text. (E.g., I use , in special modes to change buffers)
There are a couple of other benefits which you can read about here if interested. (Search for "special")
I think
pomidor-mode
should inherit fromspecial-mode
.From the info manual:
special-mode
doesn't add much behavior-wise; it's mostly just about convention. E.g., some tools enable/disable certain keybindings or hooks in special mode. My motivation for this PR is to havegod-mode
automatically disable itself in the*pomidor*
buffer without having to special-case it. (god-mode
disables itself in modes derived fromspecial-mode
automatically)It also provides a central point (
special-mode-map
) for users to define their own keybindings for modes that aren't about editing text. (E.g., I use,
in special modes to change buffers)There are a couple of other benefits which you can read about here if interested. (Search for "special")