Lumail - The console email client


Lua primitives: on_mode_change()

NOTE: Lumail-legacy has been superseded by Lumail 2.x, which has a wholly unified Lua API.

If you define the function on_mode_change it will be called whenever the global mode changes.

For example:

function on_mode_change( old, new )
   msg( "Old mode:" .. old .. " -> " .. new );
end

NOTE: This function will only be called if the mode is changed. The following sequence will only call the on_mode_change function once:

global_mode( "index" );
global_mode( "maildir" );
global_mode( "maildir" );
global_mode( "maildir" );

Availability

This function has been available since version 0.18.

See Also

See also global_mode.