define() macro built-in
Brought to you by:
tringali
unfortunately, "define" is not part of the nedit macro language, so it is not possible to define a new function with the eval() macro, so here is a rough copy'n'paste patch thats defined a new built-in macro subroutine to define a new macro subroutine.
syntax:
define_func(string function_name, string body_of_function)
Logged In: YES
user_id=122956
Originator: YES
added an option to override an previously defined function
new syntax:
define_func(string function_name, string body_of_function[, "override"])
File Added: define_func_macro.patch
gen2
gen3
Logged In: YES
user_id=122956
Originator: YES
fix a little typo
File Added: define_func_macro.patch
gen4
Logged In: YES
user_id=122956
Originator: YES
renamed to define(), which involves some parser magic to distinguish between 'define func' and 'define("func", body)'.
also new: only allow overwriting of macro functions.
File Added: define_macro.patch