]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(doc): small updates to the documentation for varargs
authorErnie Rael <errael@raelity.com>
Mon, 23 Oct 2023 17:08:38 +0000 (19:08 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 23 Oct 2023 17:13:16 +0000 (19:13 +0200)
- update and correct the documentation for varargs for Vim9 and make
  sure to mention that a <list> type is required.
- mention that 3match is used the matchparen plugin before 9.0.2054
  (actually this is not correct, but before that patch, Vim used the
  hardcoded id 3)

closes: #13403
closes: #13409

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
runtime/doc/pattern.txt
runtime/doc/vim9.txt

index 983d99535699946f58fbdfd01c95683ad9f7416c..70227a72e29378e61e7c3118d79439e16df84369 100644 (file)
@@ -1,4 +1,4 @@
-*pattern.txt*   For Vim version 9.0.  Last change: 2023 Oct 20
+*pattern.txt*   For Vim version 9.0.  Last change: 2023 Oct 23
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1462,7 +1462,7 @@ Finally, these constructs are unique to Perl:
                there can be three matches active at the same time.  The match
                with the lowest number has priority if several match at the
                same position.  It uses the match id 3.
-               The ":3match" command is used by (older Vims) |matchparen|
+               The ":3match" command is used by (Vim < 9.0.2054) |matchparen|
                plugin. You are suggested to use ":match" for manual matching
                and ":2match" for another plugin or even better make use of
                the more flexible |matchadd()| (and similar) functions instead.
index 58d9ed614266e793686855a3233c9b458c3edc8a..bba68ad4a8ba7225cd8dd08d8974cfe033e946dd 100644 (file)
@@ -1,4 +1,4 @@
-*vim9.txt*     For Vim version 9.0.  Last change: 2023 Jun 10
+*vim9.txt*     For Vim version 9.0.  Last change: 2023 Oct 23
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1487,13 +1487,14 @@ func({type})                    function with argument type, does not return
 func({type}): {type}           function with argument type and return type
 func(?{type})                  function with type of optional argument, does
                                not return a value
-func(...{type})                        function with type of variable number of
-                               arguments, does not return a value
-func({type}, ?{type}, ...{type}): {type}
+func(...list<{type}>)          function with type of list for variable number
+                               of arguments, does not return a value
+func({type}, ?{type}, ...list<{type}>): {type}
                                function with:
                                - type of mandatory argument
                                - type of optional argument
-                               - type of variable number of arguments
+                               - type of list for variable number of
+                                 arguments
                                - return type
 
 If the return type is "void" the function does not return a value.
@@ -1687,8 +1688,8 @@ argument type checking: >
        var FuncUnknownArgs: func: number
        FuncUnknownArgs = (v): number => v                      # OK
        FuncUnknownArgs = (v1: string, v2: string): number => 3 # OK
-<      FuncUnknownArgs = (...v1: list<string>): number => 333  # OK
-
+       FuncUnknownArgs = (...v1: list<string>): number => 333  # OK
+<
                         *E1211* *E1217* *E1218* *E1219* *E1220* *E1221*
                         *E1222* *E1223* *E1224* *E1225* *E1226* *E1227*
                         *E1228* *E1238* *E1250* *E1251* *E1252* *E1256*