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/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*