0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -04:00

patch 9.0.0678: using exclamation marks on :function

Problem:    Using exclamation marks on :function.
Solution:   Use :func and :endfunc as usual.
This commit is contained in:
Bram Moolenaar
2022-10-06 19:49:13 +01:00
parent 06618f94f1
commit 97f0eb169b
7 changed files with 34 additions and 32 deletions

View File

@@ -48,7 +48,7 @@ endfunc
" delete it afterwards. However, if an exception is thrown the file may remain,
" the caller should call DeleteTheScript() afterwards.
let s:script_name = ''
function! ExecAsScript(funcname)
func ExecAsScript(funcname)
" Make a script from the function passed as argument.
let s:script_name = MakeScript(a:funcname)
@@ -56,9 +56,9 @@ function! ExecAsScript(funcname)
exec "source" s:script_name
call delete(s:script_name)
let s:script_name = ''
endfunction
endfunc
function! DeleteTheScript()
func DeleteTheScript()
if s:script_name
call delete(s:script_name)
let s:script_name = ''