patch 8.2.2805: Vim9: cannot use legacy syntax in Vim9 script
Problem: Vim9: cannot use legacy syntax in Vim9 script.
Solution: Add the :legacy command.
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 7da8066..f0e8f30 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1396,6 +1396,7 @@
|:lfdo| :lfd[o] execute command in each file in location list
|:left| :le[ft] left align lines
|:leftabove| :lefta[bove] make split window appear left or above
+|:legacy| :leg[acy] make following command use legacy script syntax
|:let| :let assign a value to a variable or option
|:lexpr| :lex[pr] read locations from expr and jump to first
|:lfile| :lf[ile] read file with locations and jump to first
diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt
index 0fc7bf5..0a2ea62 100644
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -61,12 +61,17 @@
rewrite old scripts, they keep working as before. You may want to use a few
`:def` functions for code that needs to be fast.
- *:vim9* *:vim9cmd*
-:vim9[cmd] {cmd}
+:vim9[cmd] {cmd} *:vim9* *:vim9cmd*
Execute {cmd} using Vim9 script syntax and semantics.
Useful when typing a command and in a legacy script or
function.
+:leg[acy] {cmd} *:leg* *:legacy*
+ Execute {cmd} using legacy script syntax and semantics. Only
+ useful in a Vim9 script or a :def function.
+ Note that {cmd} cannot use local variables, since it is parsed
+ with legacy expression syntax.
+
==============================================================================
2. Differences from legacy Vim script *vim9-differences*