welcome: please sign in

Please enter your password of your account at the remote wiki below.
/!\ You should trust both wikis because the password could be read by the particular administrators.

Clear message
location: WritingBufferModes

A buffer-mode is a type of mode that can be enabled and disabled per-buffer, and whose effects are confined to an individual buffer. Some buffer-modes' function is to install a temporary keymap, like quote-mode and quote-next-mode. Other buffer-modes do more, like caret-mode.

1. define_buffer_mode

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: