Restrictions in the use of some functions
The following functions have certain restrictions on their use in macros:
exit
mf.acall
mf.AddExitHandler
mf.usermenu
(in the “asynchronous” call mode)Keys
Plugin.Call
Plugin.Command
Plugin.Config
Plugin.Menu
print
If a macro creates coroutines with
coroutine.wrap(f)
, then the above listed functions will not work when called from the body off
function.
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
.