Update runtime files. (closes #9741)
diff --git a/runtime/doc/testing.txt b/runtime/doc/testing.txt
index c77d594..2a74883 100644
--- a/runtime/doc/testing.txt
+++ b/runtime/doc/testing.txt
@@ -1,4 +1,4 @@
-*testing.txt* For Vim version 8.2. Last change: 2022 Feb 04
+*testing.txt* For Vim version 8.2. Last change: 2022 Feb 10
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 76bdc17..bd0c07c 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 8.2. Last change: 2022 Feb 09
+*todo.txt* For Vim version 8.2. Last change: 2022 Feb 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,6 +38,9 @@
*known-bugs*
-------------------- Known bugs and current work -----------------------
+Disallow using "s:" in Vim9 script at the script level.
+Disallow a legacy function creating an s: variable in Vim9 script.
+
Once Vim9 is stable:
- Use Vim9 for runtime files.
- Check code coverage, add more tests if needed.
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 7bb363b..435002b 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1,4 +1,4 @@
-*usr_41.txt* For Vim version 8.2. Last change: 2022 Jan 28
+*usr_41.txt* For Vim version 8.2. Last change: 2022 Feb 11
VIM USER MANUAL - by Bram Moolenaar
@@ -2512,6 +2512,8 @@
For undoing the effect of an indent script, the b:undo_indent variable should
be set accordingly.
+Both these variables use legacy script syntax, not |Vim9| syntax.
+
FILE NAME
diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt
index 143de79..5824ecb 100644
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -1,4 +1,4 @@
-*vim9.txt* For Vim version 8.2. Last change: 2022 Feb 09
+*vim9.txt* For Vim version 8.2. Last change: 2022 Feb 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -219,20 +219,18 @@
Functions and variables are script-local by default ~
*vim9-scopes*
When using `:function` or `:def` to specify a new function at the script level
-in a Vim9 script, the function is local to the script, as if "s:" was
-prefixed. Using the "s:" prefix is optional. To define a global function or
-variable the "g:" prefix must be used. For functions in a script that is to
-be imported and in an autoload script "export" needs to be used. >
+in a Vim9 script, the function is local to the script. Like prefixing "s:" in
+legacy script. To define a global function or variable the "g:" prefix must
+be used. For functions in a script that is to be imported and in an autoload
+script "export" needs to be used. >
def ThisFunction() # script-local
- def s:ThisFunction() # script-local
def g:ThatFunction() # global
export def Function() # for import and import autoload
< *E1058* *E1075*
When using `:function` or `:def` to specify a nested function inside a `:def`
function and no namespace was given, this nested function is local to the code
-block it is defined in. In a `:def` function it is not possible to define a
-script-local function. It is possible to define a global function by using
-the "g:" prefix.
+block it is defined in. It is not possible to define a script-local function.
+It is possible to define a global function by using the "g:" prefix.
When referring to a function and no "s:" or "g:" prefix is used, Vim will
search for the function:
@@ -244,6 +242,13 @@
script "s:funcref" could be used, because it could not be referred to with
"funcref". In Vim9 script it can, therefore "s:Funcref" must be used to avoid
that the name interferes with builtin functions.
+ *vim9-s-namespace*
+The use of the "s:" prefix is not supported at the Vim9 script level. All
+functions and variables without a prefix are script-local.
+In :def functions the use of "s:" is optional. This is because in legacy
+script the "s:" might be needed. Disallowing the use of "s:" only in a :def
+function in Vim9 script would be a bit confusing.
+In legacy functions the use of "s:" for script items is required, as before.
In all cases the function must be defined before used. That is when it is
called, when `:defcompile` causes it to be compiled, or when code that calls