Restrictions in the use of some functions
The following functions have certain restrictions on their use in macros:
exitmf.acallmf.AddExitHandlermf.usermenu(in the “asynchronous” call mode)KeysPlugin.CallPlugin.CommandPlugin.ConfigPlugin.Menuprint
If a macro creates coroutines with
coroutine.wrap(f), then the above listed functions will not work when called from the body offfunction.
This restriction does not exist if coroutines are created withcoroutine.create(f).The above listed functions, when called directly or indirectly with
pcall, will cause the immediate failure ofpcall.
This restriction does not exist if LuaJIT 2.x is used.The above listed functions will only work when called from a macro body (usually it is function
action). That means those functions will not work when called from:- dialog procedures
- function condition of a macro
- event handlers
- etc. etc.
The restrictions of p.3 do not exist, if the above listed functions are called via mf.postmacro or far.MacroPost.