I use a mangled old version of extman which I really must clean up sometime, so I will be interested in your version.
As the initial script which scite runs, its prime responsibility seems to be to declare the variables and tables which the lua user does not want to be refreshed on buffer switches. For all of the scripts which extman calls with scite_dofile or plain dofile, any global variables and tables they declare will have their values reset on buffer switches but the ones declared in the initial script are persistent. This script refreshing has been good for my scites stability as I have about 10kloc of anarchic lua scripts attached to keypresses, with a sort of do-on-keypress system.
Instead of declaring multiple persistent globals in the initial script, a lua user might prefer to nest their own persistent things inside a global table called something like 'maintain'. It could be good to set a standard or idiom for this in extman.
The secondary role of extman seems to be to provide the functions which the historical extman provided for general compatibility and are still good to use. I do use in my codebase the scite_OnEvent managers as it did seem a bit neater to write:
scite_OnKey(my_function_that_reacts_to_keys)instead of:
function OnKey(key,shift,ctrl,alt)
return my_function_that_reacts_to_keys(key,shift,ctrl,alt)
end - and it could be handy to use the options scite_OnKey(somefun,'remove') or scite_OnKey(somefun,'once')
I have a ton of utility files and functions, but none of them seem to need to be in the initial script, just the occasional extra persistent global wants registered there. I even think extmans scite_OnEvent registers don't need to be in the initial script, but might be wrong. I'm wondering about an absolute minimal extman including comment notes about the system, which can scite_dofile a secondary extman which contains the legacy extman utility functions, and then a selection of others that help the varied needs of scite lua users, enticing others to add their own. Just wondering though : )