redesign buffer-modes and page-modes
multiple page modes may be enabled at the same time. this will allow for
granulated page-modes, a one-to-one relationship between modes and
features, allowing the user to easily configure which features they want
in a uniform way across all page-modes. (splitting up existing page-modes
is a project for future patches.)
call forms of both define_buffer_mode and define_page_mode have changed. 'enable'
and 'disable' are now both required positional arguments instead of keyword arguments,
and define_page_mode also takes its test regexp/function as an argument.
buffer-modes and page-modes are now js objects instead of functions. these objects
have 'enable' and 'disable' methods to turn them on and off, instead of the emacs style
of having a toggle function that takes a -1/1 (or true/false) argument. the new style
is more idiomatic of js, and not so arbitrary.
buffer-mode classes removed: no longer any need for mutually exclusive groups
of modes, like page-modes were. if need arises later, it's easy to add back.
buffer.page now exists whether any page-modes are running or not. page-local
variables apart from page-modes can be useful with cwd (setting cwd based on
current host) for example.
23 files changed: