changeset 20317:2334bf788e8a

Update runtime files Commit: https://github.com/vim/vim/commit/2cfb4a2a7248eeb40112bb482ab5b15f01b20433 Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 7 18:56:00 2020 +0200 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Thu, 07 May 2020 19:00:05 +0200
parents 495753de724b
children 3cbcee39fc5c
files runtime/doc/options.txt runtime/doc/todo.txt runtime/doc/vim9.txt runtime/filetype.vim runtime/ftplugin/dosbatch.vim runtime/ftplugin/man.vim runtime/plugin/gzip.vim runtime/syntax/asciidoc.vim runtime/syntax/make.vim runtime/syntax/masm.vim
diffstat 10 files changed, 106 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt*	For Vim version 8.2.  Last change: 2020 Apr 10
+*options.txt*	For Vim version 8.2.  Last change: 2020 May 03
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 8.2.  Last change: 2020 Apr 30
+*todo.txt*      For Vim version 8.2.  Last change: 2020 May 07
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -39,22 +39,22 @@ browser use: https://github.com/vim/vim/
 -------------------- Known bugs and current work -----------------------
 
 Vim9 script:
-Big changes, need design:
+Big changes, may need design:
 - Make closures work:
-  Grab the part of the stack that has the arguments and local vars.
-  Pass a pointer and offset to the closure where this stack fragment is (frame
-  pointer).
-  When a closure disappears at end of the function - nothing to do.
-  When a closure remains at end of the function: copy frame, attach to closure.
+  - call closure from not compiled context
+  - Create closure in a loop.  Need to make a list of them.
+- Having constant expr evaluation separate does not scale.
+  First parse the expression, then simplify, then generate code.
 - At the vim9 script level: Allow using a function that is defined later.
   Requires compiling functions only when the whole script has been sourced.
   Like Javascript "hoisting", but only at the script level:
+  0. If script was sourced before, clear all script-local functions and
+     variables. (variables still to be implemented)
   1. Discovery phase: Read the file to find all functions, variable
      declarations and imports If a variable has a constant expression we get
      the type, otherwise it will be "any".  Follow imports recursively.
   2. Compilation phase: compile :def function bodies, using declared types
   3. Execution phase: Execute imports when encountered. (skip over functions)
-- When sourcing a script again, also delete script-local variables.
 Making everything work:
 - Test that a script-local function in Vim9 script cannot be deleted.
 - Test that a function defined inside a :def function is local to that
@@ -80,10 +80,6 @@ Making everything work:
 - eval_expr() in ex_cexpr()
 - eval_expr() call in dbg_parsearg() and debuggy_find()
 New syntax and functionality:
-- define function and create funcref in one step:
-	let ref = def(arg: type): rettype
-	    body
-	enddef
 Improve error checking:
 - "echo Func()" is an error if Func() does not return anything.
 Also:
@@ -118,6 +114,10 @@ Further improvements:
 - compile options that are an expression, e.g. "expr:" in 'spellsuggest',
   'foldexpr', 'foldtext', 'printexpr', 'diffexpr', 'patchexpr', 'charconvert',
   'balloonexpr', 'includeexpr', 'indentexpr', 'formatexpr'.
+- Make inline function work, to be used as a funcref:
+	let ref = def(arg: type): rettype
+	    body
+	enddef
 - compile get_lambda_tv() in popup_add_timeout()
 - compile "skip" argument of searchpair()
 - compile "expr" and "call" expression of a channel in channel_exe_cmd()?
@@ -254,9 +254,14 @@ Patch for the Haiku port: #5961
 
 Patch to add Turkish manual. (Emir Sarı, #5641)
 
+Patch to add getmarklist() (Yegappan, #6032)
+
 Patch to support different color for undercurl in cterm.
 (Timur Celik, #6011)
 
+When SIGTSTP is ignored, don't let CTRL-Z suspend Vim? (Kurtis Rader, #5990)
+Fixed by patch #6026.  Makes tests fail...
+
 Patch to support cindent option to handle pragmas differently.
 (Max Rumpf, #5468)
 
@@ -356,8 +361,6 @@ unlisted. (#4478)
 
 Patch to include reduce() function. (#5481)
 
-When SIGTSTP is ignored, don't let CTRL-Z suspend Vim? (Kurtis Rader, #5990)
-
 Statusline highlighting error, off by one. (#5599)
 
 Enable 'termbidi' if $VTE_VERSION >= 5703 ?
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -1,4 +1,4 @@
-*vim9.txt*	For Vim version 8.2.  Last change: 2020 Apr 30
+*vim9.txt*	For Vim version 8.2.  Last change: 2020 May 06
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -125,10 +125,56 @@ The result is that functions and variabl
 found in the script, either defined there or imported.  Global functions and
 variables could be defined anywhere (good luck finding where!).
 
-Global functions can be defined and deleted at nearly any time.  In Vim9
-script script-local functions are defined once when the script is sourced and
-cannot be deleted.  Except that when the same script is sourced again all
-existing script-local functions and variables are deleted.
+Global functions can be still be defined and deleted at nearly any time.  In
+Vim9 script script-local functions are defined once when the script is sourced
+and cannot be deleted.
+
+
+Four phases when loading a Vim9 script ~
+
+In legacy script the functions are created when encountered, but parsed only
+when used.  This allows for defining functions in any order and having them
+call each other: >
+	func One()
+	   call Two()
+	endfunc
+	func Two()
+	   if cond
+	      call One()  " recursive call
+	   endif
+	endfunc
+	call One()
+
+In Vim9 script the functions are compiled.  If using the same functions as the
+above example it is not possible to compile function One without knowing that
+function Two exists. Or this would require a runtime check, which is slow and
+does not allow for compile time type checking.
+
+When sourcing a Vim9 script this happens in four phases:
+1. Cleanup: If the script was sourced before all script-local variables,
+   imports and functions are deleted.
+2. Discovery: The script is read and encountered functions, imports and
+   variables are recognized.  The type is parsed.  Variable initializers that
+   are a constant are evaluated, this can give the type of the variable.
+3. Compilation: Functions are compiled.  The script-local functions, imports
+   and variables from the discovery phase are recognized and types are
+   checked.
+4. Execution: the commands in the script are executed. Functions are skipped
+   over.  Variable initializers are evaluated, unless they are a constant.
+
+The result is that items defined at the script level can be used anywhere in
+the script. This allows for putting the main function at the top: >
+	def Main()
+	  SubOne()
+	  SubTwo()
+	enddef
+	def SubOne()
+	  ...
+	def SubTwo()
+	  ...
+
+Note that script-local variables should either have a type defined or have a
+constant initializer.  Otherwise an error is given for the type being unknown.
 
 
 Variable declarations with :let and :const ~
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
 " Vim support file to detect file types
 "
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2020 Apr 29
+" Last Change:	2020 May 07
 
 " Listen very carefully, I will say this only once
 if exists("did_load_filetypes")
--- a/runtime/ftplugin/dosbatch.vim
+++ b/runtime/ftplugin/dosbatch.vim
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:    MS-DOS .bat files
 " Maintainer:  Mike Williams <mrw@eandem.co.uk>
-" Last Change: 14th April 2019
+" Last Change: 7th May 2020
 
 " Only do this when not done yet for this buffer
 if exists("b:did_ftplugin")
@@ -19,12 +19,21 @@ setlocal comments=b:rem,b:@rem,b:REM,b:@
 setlocal commentstring=::\ %s
 setlocal formatoptions-=t formatoptions+=rol
 
+" Lookup DOS keywords using Windows command help.
+if executable('help.exe')
+  if has('terminal')
+    setlocal keywordprg=:term\ help.exe
+  else
+    setlocal keywordprg=help.exe
+  endif
+endif
+
 " Define patterns for the browse file filter
 if has("gui_win32") && !exists("b:browsefilter")
   let b:browsefilter = "DOS Batch Files (*.bat, *.cmd)\t*.bat;*.cmd\nAll Files (*.*)\t*.*\n"
 endif
 
-let b:undo_ftplugin = "setlocal comments< formatoptions<"
+let b:undo_ftplugin = "setlocal comments< formatoptions< keywordprg<"
     \ . "| unlet! b:browsefiler"
 
 let &cpo = s:cpo_save
--- a/runtime/ftplugin/man.vim
+++ b/runtime/ftplugin/man.vim
@@ -1,8 +1,8 @@
 " Vim filetype plugin file
 " Language:	man
 " Maintainer:	Jason Franklin <vim@justemail.net>
-" Previous Maintainer:	SungHyun Nam <goweol@gmail.com>
-" Last Change: 	2020 Apr 30
+" Maintainer:	SungHyun Nam <goweol@gmail.com>
+" Last Change: 	2020 May 07
 
 " To make the ":Man" command available before editing a manual page, source
 " this script from your startup vimrc file.
@@ -206,7 +206,7 @@ func <SID>GetPage(cmdmods, ...)
   endif
   let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat'
   let env_cmd .= ' GROFF_NO_SGR=1'
-  let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' 2>/dev/null | col -b'
+  let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' | col -b'
   silent exec "r !" . man_cmd
 
   if unsetwidth
--- a/runtime/plugin/gzip.vim
+++ b/runtime/plugin/gzip.vim
@@ -20,7 +20,7 @@ augroup gzip
   "
   " Set binary mode before reading the file.
   " Use "gzip -d", gunzip isn't always available.
-  autocmd BufReadPre,FileReadPre	*.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst setlocal bin
+  autocmd BufReadPre,FileReadPre	*.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst,*.br setlocal bin
   autocmd BufReadPost,FileReadPost	*.gz  call gzip#read("gzip -dn")
   autocmd BufReadPost,FileReadPost	*.bz2 call gzip#read("bzip2 -d")
   autocmd BufReadPost,FileReadPost	*.Z   call gzip#read("uncompress")
@@ -28,6 +28,7 @@ augroup gzip
   autocmd BufReadPost,FileReadPost	*.xz  call gzip#read("xz -d")
   autocmd BufReadPost,FileReadPost	*.lz  call gzip#read("lzip -d")
   autocmd BufReadPost,FileReadPost	*.zst call gzip#read("zstd -d --rm")
+  autocmd BufReadPost,FileReadPost	*.br call gzip#read("brotli -d --rm")
   autocmd BufWritePost,FileWritePost	*.gz  call gzip#write("gzip")
   autocmd BufWritePost,FileWritePost	*.bz2 call gzip#write("bzip2")
   autocmd BufWritePost,FileWritePost	*.Z   call gzip#write("compress -f")
@@ -35,6 +36,7 @@ augroup gzip
   autocmd BufWritePost,FileWritePost	*.xz  call gzip#write("xz -z")
   autocmd BufWritePost,FileWritePost	*.lz  call gzip#write("lzip")
   autocmd BufWritePost,FileWritePost	*.zst  call gzip#write("zstd --rm")
+  autocmd BufWritePost,FileWritePost	*.br  call gzip#write("brotli --rm")
   autocmd FileAppendPre			*.gz  call gzip#appre("gzip -dn")
   autocmd FileAppendPre			*.bz2 call gzip#appre("bzip2 -d")
   autocmd FileAppendPre			*.Z   call gzip#appre("uncompress")
@@ -42,6 +44,7 @@ augroup gzip
   autocmd FileAppendPre			*.xz   call gzip#appre("xz -d")
   autocmd FileAppendPre			*.lz   call gzip#appre("lzip -d")
   autocmd FileAppendPre			*.zst call gzip#appre("zstd -d --rm")
+  autocmd FileAppendPre			*.br call gzip#appre("brotli -d --rm")
   autocmd FileAppendPost		*.gz  call gzip#write("gzip")
   autocmd FileAppendPost		*.bz2 call gzip#write("bzip2")
   autocmd FileAppendPost		*.Z   call gzip#write("compress -f")
@@ -49,4 +52,5 @@ augroup gzip
   autocmd FileAppendPost		*.xz call gzip#write("xz -z")
   autocmd FileAppendPost		*.lz call gzip#write("lzip")
   autocmd FileAppendPost		*.zst call gzip#write("zstd --rm")
+  autocmd FileAppendPost		*.br call gzip#write("brotli --rm")
 augroup END
--- a/runtime/syntax/asciidoc.vim
+++ b/runtime/syntax/asciidoc.vim
@@ -1,13 +1,15 @@
 " Vim syntax file
-" Language:     AsciiDoc
-" Author:       Stuart Rackham <srackham@gmail.com> (inspired by Felix
-"               Obenhuber's original asciidoc.vim script).
-" URL:          http://asciidoc.org/
-" Licence:      GPL (http://www.gnu.org)
-" Remarks:      Vim 6 or greater
-" Last Update:  2014 Aug 29 (see Issue 240)
+" Language:        AsciiDoc
+" Maintainer:      @aerostitch on GitHub (tag me in your issue in the
+"                  github/vim/vim repository and I'll answer when available)
+" Original author: Stuart Rackham <srackham@gmail.com> (inspired by Felix
+"                  Obenhuber's original asciidoc.vim script).
+" URL:             http://asciidoc.org/
+" Licence:         GPL (http://www.gnu.org)
+" Remarks:         Vim 6 or greater
+" Last Update:     2020 May 03 (see Issue 240)
 " Limitations:
-" 
+"
 " - Nested quoted text formatting is highlighted according to the outer
 "   format.
 " - If a closing Example Block delimiter may be mistaken for a title
@@ -23,9 +25,7 @@ if exists("b:current_syntax")
   finish
 endif
 
-syn clear
-syn sync fromstart
-syn sync linebreaks=100
+" Use the default syntax syncing.
 
 " Run :help syn-priority to review syntax matching priority.
 syn keyword asciidocToDo TODO FIXME CHECK TEST XXX ZZZ DEPRECATED
--- a/runtime/syntax/make.vim
+++ b/runtime/syntax/make.vim
@@ -3,7 +3,7 @@
 " Maintainer:	Roland Hieber <rohieb+vim-iR0jGdkV@rohieb.name>, <https://github.com/rohieb>
 " Previous Maintainer:	Claudio Fleiner <claudio@fleiner.com>
 " URL:		https://github.com/vim/vim/blob/master/runtime/syntax/make.vim
-" Last Change:	2020 Mar 04
+" Last Change:	2020 May 03
 
 " quit when a syntax file was already loaded
 if exists("b:current_syntax")
@@ -73,7 +73,7 @@ syn match makePreCondit	"^ *\(ifn\=\(eq\
 syn match makeInclude	"^ *[-s]\=include\s.*$"
 syn match makeStatement	"^ *vpath"
 syn match makeExport    "^ *\(export\|unexport\)\>"
-syn match makeOverride	"^ *override"
+syn match makeOverride	"^ *override\>"
 " Statements / Functions (GNU make)
 syn match makeStatement contained "(\(abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|file\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|guile\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|subst\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1
 
--- a/runtime/syntax/masm.vim
+++ b/runtime/syntax/masm.vim
@@ -2,8 +2,7 @@
 " Language:	Microsoft Macro Assembler (80x86)
 " Orig Author:	Rob Brady <robb@datatone.com>
 " Maintainer:	Wu Yongwei <wuyongwei@gmail.com>
-" Last Change:	$Date: 2013/11/13 11:49:24 $
-" $Revision: 1.48 $
+" Last Change:	2020-05-07 17:04:10 +0800
 
 " Quit when a syntax file was already loaded
 if exists("b:current_syntax")
@@ -13,10 +12,12 @@ endif
 let s:cpo_save = &cpo
 set cpo&vim
 
+setlocal iskeyword=@,48-57,_,36,60,62,63,@-@
+
 syn case ignore
 
 
-syn match masmIdentifier	"[@a-z_$?][@a-z0-9_$?]*"
+syn match masmIdentifier	"[@a-z_$?][@a-z0-9_$?<>]*"
 syn match masmLabel		"^\s*[@a-z_$?][@a-z0-9_$?]*:"he=e-1
 
 syn match masmDecimal		"[-+]\?\d\+[dt]\?"