1
0
forked from aniani/vim

patch 9.0.0370: cleaning up afterwards can make a function messy

Problem:    Cleaning up afterwards can make a function messy.
Solution:   Add the :defer command.
This commit is contained in:
Bram Moolenaar
2022-09-03 21:35:53 +01:00
parent 06d32a0c17
commit 1d84f7608f
19 changed files with 632 additions and 158 deletions

View File

@@ -467,6 +467,9 @@ EXCMD(CMD_def, "def", ex_function,
EXCMD(CMD_defcompile, "defcompile", ex_defcompile,
EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK|EX_TRLBAR|EX_EXTRA,
ADDR_NONE),
EXCMD(CMD_defer, "defer", ex_call,
EX_NEEDARG|EX_EXTRA|EX_NOTRLCOM|EX_EXPR_ARG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK,
ADDR_NONE),
EXCMD(CMD_delcommand, "delcommand", ex_delcommand,
EX_NEEDARG|EX_WORD1|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
ADDR_NONE),