patch 8.2.4416: Vim9: using a script-local function requires using "s:"
Problem: Vim9: using a script-local function requires using "s:" when
setting 'completefunc'.
Solution: Do not require "s:" in Vim9 script. (closes #9796)
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 1d3f768..8fcbc99 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -383,12 +383,22 @@
set opfunc=function('MyOpFunc')
set opfunc=funcref('MyOpFunc')
set opfunc={a\ ->\ MyOpFunc(a)}
- " set using a funcref variable
+
+Set to a script-local function: >
+ set opfunc=s:MyLocalFunc
+ set opfunc=<SID>MyLocalFunc
+In |Vim9| script the "s:" and "<SID>" can be omitted if the function exists in
+the script: >
+ set opfunc=MyLocalFunc
+
+Set using a funcref variable: >
let Fn = function('MyTagFunc')
let &tagfunc = Fn
- " set using a lambda expression
+
+Set using a lambda expression: >
let &tagfunc = {t -> MyTagFunc(t)}
- " set using a variable with lambda expression
+
+Set using a variable with lambda expression: >
let L = {a, b, c -> MyTagFunc(a, b , c)}
let &tagfunc = L