The call form of define_buffer_mode looks like this:
define_buffer_mode("example-mode",
function enable (buffer) {
},
function disable (buffer) {
},
$doc = "An example buffer-mode.");Assuming the name "example-mode", define_buffer_mode produces the following things:
A variable example_mode whose value is an object containing all of the properties of the mode, including enable and disable methods.
A command example-mode that toggles the mode for the current buffer.
Two hooks, example_mode_enable_hook and example_mode_disable_hook.