runtime(doc): mention alternative check for vim9script

Commit: 
https://github.com/vim/vim/commit/de4b244bfc16941c642e882e0e13e98bd49134c4
Author: Konfekt <konf...@users.noreply.github.com>
Date:   Wed Mar 5 21:03:21 2025 +0100

    runtime(doc): mention alternative check for vim9script
    
    Vim9 syntax changed before Vim 9 leading to errors thrown if checked for
    availability of Vim9script in Vim Version 8.2 such as
    
    This check seems to work as well and throws less errors on Vim 8.2 such
    as on Ubuntu 22.04
    
    closes: #16783
    
    Signed-off-by: Konfekt <konf...@users.noreply.github.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt
index 5ea4ebe58..3addea856 100644
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -1,4 +1,4 @@
-*vim9.txt*     For Vim version 9.1.  Last change: 2025 Jan 21
+*vim9.txt*     For Vim version 9.1.  Last change: 2025 Mar 05
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1921,6 +1921,10 @@ There is one way to use both legacy and Vim9 syntax in 
one script file: >
 This allows for writing a script that takes advantage of the Vim9 script
 syntax if possible, but will also work on a Vim version without it.
 
+Note that Vim9 syntax changed before Vim 9 so that scripts using the current
+syntax (such as "import from" instead of "import") might throw errors.
+To prevent these, a safer check could be for |v:version| >= 900 instead.
+
 This can only work in two ways:
 1. The "if" statement evaluates to false, the commands up to `endif` are
    skipped and `vim9script` is then the first command actually executed.
@@ -2435,4 +2439,4 @@ support for classes in Vim is then a problem.
 
 
 
- vim:tw=78:ts=8:noet:ft=help:norl:
+ vim:tw=78:ts=8:noet:ft=help:norl:nofen:

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1tpv8x-00AcS3-Dv%40256bit.org.

Raspunde prin e-mail lui