From b51db1b2af106858da4b4a88966f0f0789c47b25 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 3 Jun 2009 19:06:09 +0200 Subject: [PATCH] update runtime files --- runtime/doc/change.txt | 6 ++- runtime/doc/eval.txt | 26 ++++++------ runtime/doc/if_mzsch.txt | 97 +++++++++++++++++-------------------------- runtime/doc/options.txt | 9 ++-- runtime/doc/quickfix.txt | 4 +- runtime/doc/syntax.txt | 10 +++-- runtime/doc/tags | 1 + runtime/doc/todo.txt | 46 ++++++++++++++------ runtime/doc/usr_05.txt | 4 +- runtime/ftplugin/dosbatch.vim | 6 +-- runtime/getdos.aap | 30 ++++++------- runtime/getunix.aap | 32 +++++++------- runtime/indent/xml.vim | 14 +++++-- runtime/syntax/dosbatch.vim | 4 +- runtime/syntax/gdb.vim | 4 +- runtime/syntax/help.vim | 4 +- runtime/syntax/kconfig.vim | 3 +- runtime/syntax/tcl.vim | 51 ++++++++++++++++++----- 18 files changed, 200 insertions(+), 151 deletions(-) diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index bb64236e..6bc4cb03 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 7.2. Last change: 2009 Apr 29 +*change.txt* For Vim version 7.2. Last change: 2009 Jun 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -524,7 +524,9 @@ comment (starting with '"') after the ":!" command. option is empty (this is the default), use the internal formatting function |C-indenting|. But when 'indentexpr' is not empty, it will be used instead - |indent-expression|. + |indent-expression|. When Vim was compiled without + internal formatting then the "indent" program is used + as a last resort. *==* == Filter [count] lines like with ={motion}. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 124dd54b..c06fd3c5 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.2. Last change: 2009 Apr 29 +*eval.txt* For Vim version 7.2. Last change: 2009 May 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1684,7 +1684,7 @@ char2nr( {expr}) Number ASCII value of first char in {expr} cindent( {lnum}) Number C indent for line {lnum} clearmatches() none clear all matches col( {expr}) Number column nr of cursor or mark -complete({startcol}, {matches}) none set Insert mode completion +complete( {startcol}, {matches}) none set Insert mode completion complete_add( {expr}) Number add completion match complete_check() Number check for key typed during completion confirm( {msg} [, {choices} [, {default} [, {type}]]]) @@ -1709,7 +1709,7 @@ eval( {string}) any evaluate {string} into its value eventhandler( ) Number TRUE if inside an event handler executable( {expr}) Number 1 if executable {expr} exists exists( {expr}) Number TRUE if {expr} exists -extend({expr1}, {expr2} [, {expr3}]) +extend( {expr1}, {expr2} [, {expr3}]) List/Dict insert items of {expr2} into {expr1} expand( {expr} [, {flag}]) String expand special keywords in {expr} feedkeys( {string} [, {mode}]) Number add key sequence to typeahead buffer @@ -1751,7 +1751,7 @@ getftime( {fname}) Number last modification time of file getftype( {fname}) String description of type of file {fname} getline( {lnum}) String line {lnum} of current buffer getline( {lnum}, {end}) List lines {lnum} to {end} of current buffer -getloclist({nr}) List list of location list items +getloclist( {nr}) List list of location list items getmatches() List list of current matches getpid() Number process ID of Vim getpos( {expr}) List position of cursor, mark, etc. @@ -1820,9 +1820,9 @@ matchlist( {expr}, {pat}[, {start}[, {count}]]) List match and submatches of {pat} in {expr} matchstr( {expr}, {pat}[, {start}[, {count}]]) String {count}'th match of {pat} in {expr} -max({list}) Number maximum value of items in {list} -min({list}) Number minimum value of items in {list} -mkdir({name} [, {path} [, {prot}]]) +max( {list}) Number maximum value of items in {list} +min( {list}) Number minimum value of items in {list} +mkdir( {name} [, {path} [, {prot}]]) Number create directory {name} mode( [expr]) String current editing mode nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum} @@ -1834,7 +1834,7 @@ printf( {fmt}, {expr1}...) String format text pumvisible() Number whether popup menu is visible range( {expr} [, {max} [, {stride}]]) List items from {expr} to {max} -readfile({fname} [, {binary} [, {max}]]) +readfile( {fname} [, {binary} [, {max}]]) List get list of lines from file {fname} reltime( [{start} [, {end}]]) List get time value reltimestr( {time}) String turn time value into a String @@ -1855,7 +1855,7 @@ reverse( {list}) List reverse {list} in-place round( {expr}) Float round off {expr} search( {pattern} [, {flags} [, {stopline} [, {timeout}]]]) Number search for {pattern} -searchdecl({name} [, {global} [, {thisblock}]]) +searchdecl( {name} [, {global} [, {thisblock}]]) Number search for variable declaration searchpair( {start}, {middle}, {end} [, {flags} [, {skip} [...]]]) Number search for other end of start/end pair @@ -1910,7 +1910,7 @@ synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col} synIDattr( {synID}, {what} [, {mode}]) String attribute {what} of syntax ID {synID} synIDtrans( {synID}) Number translated syntax ID of {synID} -synstack({lnum}, {col}) List stack of syntax IDs at {lnum} and {col} +synstack( {lnum}, {col}) List stack of syntax IDs at {lnum} and {col} system( {expr} [, {input}]) String output of shell command/filter {expr} tabpagebuflist( [{arg}]) List list of buffer numbers in tab page tabpagenr( [{arg}]) Number number of current or last tab page @@ -1934,10 +1934,10 @@ winheight( {nr}) Number height of window {nr} winline() Number window line of the cursor winnr( [{expr}]) Number number of current window winrestcmd() String returns command to restore window sizes -winrestview({dict}) none restore view of current window +winrestview( {dict}) none restore view of current window winsaveview() Dict save view of current window winwidth( {nr}) Number width of window {nr} -writefile({list}, {fname} [, {binary}]) +writefile( {list}, {fname} [, {binary}]) Number write list of lines to file {fname} abs({expr}) *abs()* @@ -3768,7 +3768,7 @@ line({expr}) The result is a Number, which is the line number of the file < *last-position-jump* This autocommand jumps to the last known position in a file just after opening it, if the '" mark is set: > - :au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif + :au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif line2byte({lnum}) *line2byte()* Return the byte count from the start of the buffer for line diff --git a/runtime/doc/if_mzsch.txt b/runtime/doc/if_mzsch.txt index 87298ecc..d2254441 100644 --- a/runtime/doc/if_mzsch.txt +++ b/runtime/doc/if_mzsch.txt @@ -1,4 +1,4 @@ -*if_mzsch.txt* For Vim version 7.2. Last change: 2008 Jun 28 +*if_mzsch.txt* For Vim version 7.2. Last change: 2009 May 26 VIM REFERENCE MANUAL by Sergey Khorev @@ -42,10 +42,6 @@ Note: On FreeBSD you should use the "drscheme" port. *:mzfile* *:mzf* :[range]mzf[ile] {file} Execute the MzScheme script in {file}. {not in Vi} - All statements are executed in the namespace of the - buffer that was current during :mzfile start. - If you want to access other namespaces, use - 'parameterize'. All of these commands do essentially the same thing - they execute a piece of MzScheme code, with the "current range" set to the given line @@ -54,8 +50,6 @@ range. In the case of :mzscheme, the code to execute is in the command-line. In the case of :mzfile, the code to execute is the contents of the given file. -Each buffer has its own MzScheme namespace. Global namespace is bound to -the "global-namespace" value from the 'vimext' module. MzScheme interface defines exception exn:vim, derived from exn. It is raised for various Vim errors. @@ -79,40 +73,8 @@ To avoid clashes with MzScheme, consider using prefix when requiring module, e.g.: > :mzscheme (require (prefix vim- vimext)) < -All the examples below assume this naming scheme. Note that you need to do -this again for every buffer. +All the examples below assume this naming scheme. -The auto-instantiation can be achieved with autocommands, e.g. you can put -something like this in your .vimrc (EOFs should not have indentation): > - function s:MzRequire() - if has("mzscheme") - :mz << EOF - (require (prefix vim- vimext)) - (let ((buf (vim-get-buff-by-name (vim-eval "expand(\"\")")))) - (when (and buf (not (eq? buf (vim-curr-buff)))) - (parameterize ((current-namespace (vim-get-buff-namespace buf))) - (namespace-attach-module vim-global-namespace 'vimext) - (namespace-require '(prefix vim vimext))))) - EOF - endif - endfunction - - function s:MzStartup() - if has("mzscheme") - au BufNew,BufNewFile,BufAdd,BufReadPre * :call s:MzRequire() - :mz << EOF - (current-library-collection-paths - (cons - (build-path (find-system-path 'addon-dir) (version) "collects") - (current-library-collection-paths))) - EOF - endif - endfunction - - call s:MzStartup() -< - -The global namespace just instantiated this module with the prefix "vimext:". *mzscheme-sandbox* When executed in the |sandbox|, access to some filesystem and Vim interface procedures is restricted. @@ -121,15 +83,20 @@ procedures is restricted. 2. Examples *mzscheme-examples* > :mzscheme (display "Hello") + :mz (display (string-append "Using MzScheme version " (version))) + :mzscheme (require (prefix vim- vimext)) ; for MzScheme < 4.x + :mzscheme (require (prefix-in vim- 'vimext)) ; MzScheme 4.x :mzscheme (vim-set-buff-line 10 "This is line #10") < Inline script usage: > function! SetFirstLine() :mz << EOF (display "!!!") + (require (prefix vim- vimext)) + ; for newer versions (require (prefix-in vim- 'vimext)) (vim-set-buff-line 1 "This is line #1") (vim-beep) - EOF + EOF endfunction nmap :call SetFirstLine() @@ -137,17 +104,33 @@ Inline script usage: > File execution: > :mzfile supascript.scm < -Accessing the current buffer namespace from an MzScheme program running in -another buffer within |:mzfile|-executed script : > - ; Move to the window below - (vim-command "wincmd j") - ; execute in the context of buffer, to which window belongs - ; assume that buffer has 'textstring' defined - (parameterize ((current-namespace - (vim-get-buff-namespace (vim-curr-buff)))) - (eval '(vim-set-buff-line 1 textstring))) +Vim exception handling: > + :mz << EOF + (require (prefix vim- vimext)) + ; for newer versions (require (prefix-in vim- 'vimext)) + (with-handlers + ([exn:vim? (lambda (e) (display (exn-message e)))]) + (vim-eval "nonsense-string")) + EOF < +Auto-instantiation of vimext module (can be placed in your |vimrc|): > + function! MzRequire() + :redir => l:mzversion + :mz (version) + :redir END + if strpart(l:mzversion, 1, 1) < "4" + " MzScheme versions < 4.x: + :mz (require (prefix vim- vimext)) + else + " newer versions: + :mz (require (prefix-in vim- 'vimext)) + endif + endfunction + if has("mzscheme") + silent call MzRequire() + endif +< ============================================================================== 3. Threads *mzscheme-threads* @@ -168,11 +151,11 @@ interface. Common ------ (command {command-string}) Perform the vim ":Ex" style command. - (eval {expr-string}) Evaluate the vim expression to a string. - A |List| is turned into a string by - joining the items and inserting line - breaks. - NOTE clashes with MzScheme eval + (eval {expr-string}) Evaluate the vim expression into + respective MzScheme object: |Lists| are + represented as Scheme lists, + |Dictionaries| as hash tables. + NOTE the name clashes with MzScheme eval (range-start) Start/End of the range passed with (range-end) the Scheme command. (beep) beep @@ -186,7 +169,6 @@ Common be set. The symbol 'global can be passed as {buffer-or-window}. Then |:setglobal| will be used. - global-namespace The MzScheme main namespace. Buffers *mzscheme-buffer* ------- @@ -228,7 +210,6 @@ Buffers *mzscheme-buffer* if there is no such buffer. (get-buff-by-num {buffernum}) Get a buffer by its number (return #f if there is no buffer with this number). - (get-buff-namespace [buffer]) Get buffer namespace. Windows *mzscheme-window* ------ @@ -250,7 +231,7 @@ Windows *mzscheme-window* (set-cursor (line . col) [window]) Set cursor position. ============================================================================== -5. Dynamic loading *mzscheme-dynamic* +5. Dynamic loading *mzscheme-dynamic* *E812* On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version| output then includes |+mzscheme/dyn|. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 2bfa614a..7e59d7f5 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.2. Last change: 2009 Apr 12 +*options.txt* For Vim version 7.2. Last change: 2009 Jun 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2450,7 +2450,8 @@ A jump table for the options with a short description can be found at |Q_op|. {not in Vi} External program to use for "=" command. When this option is empty the internal formatting functions are used; either 'lisp', 'cindent' - or 'indentexpr'. + or 'indentexpr'. When none of these are set or Vim was compiled + without internal formatting, the "indent" program is used. Environment variables are expanded |:set_env|. See |option-backslash| about including spaces and backslashes. This option cannot be set from a |modeline| or in the |sandbox|, for @@ -4098,8 +4099,8 @@ A jump table for the options with a short description can be found at |Q_op|. displayed as , with the hexadecimal value of the byte. When 'display' contains "uhex" all unprintable characters are displayed as . - The NonText highlighting will be used for unprintable characters. - |hl-NonText| + The SpecialKey highlighting will be used for unprintable characters. + |hl-SpecialKey| Multi-byte characters 256 and above are always included, only the characters up to 255 are specified with this option. When a character diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 02d3d02c..b7343151 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 7.2. Last change: 2009 May 08 +*quickfix.txt* For Vim version 7.2. Last change: 2009 May 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -630,7 +630,7 @@ id-utils) in a similar way to its compiler integration (see |:make| above). Just like ":grep", but instead of making a new list of errors the matches are appended to the current list. Example: > - :cf /dev/null + :call setqflist([]) :bufdo grepadd! something % < The first command makes a new error list which is empty. The second command executes "grepadd" for each diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index e819d8ef..0c814d7a 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.2. Last change: 2009 Feb 18 +*syntax.txt* For Vim version 7.2. Last change: 2009 May 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -201,8 +201,12 @@ that you write the syntax file in a directory that is early in 'runtimepath'. Vim will only load the first syntax file found. -NAMING CONVENTIONS - *group-name* *{group-name}* *E669* *W18* +NAMING CONVENTIONS *group-name* *{group-name}* *E669* *W18* + +A syntax group name is to be used for syntax items that match the same kind of +thing. These are then linked to a highlight group that specifies the color. +A syntax group name doesn't specify any color or attributes itself. + The name for a highlight or syntax group must consist of ASCII letters, digits and the underscore. As a regexp: "[a-zA-Z0-9_]*" diff --git a/runtime/doc/tags b/runtime/doc/tags index 5cf2009d..edfbe633 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4111,6 +4111,7 @@ E809 cmdline.txt /*E809* E81 map.txt /*E81* E810 diff.txt /*E810* E811 autocmd.txt /*E811* +E812 if_mzsch.txt /*E812* E82 message.txt /*E82* E83 message.txt /*E83* E84 windows.txt /*E84* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 464d1b70..73e3976e 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.2. Last change: 2009 May 13 +*todo.txt* For Vim version 7.2. Last change: 2009 Jun 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -30,25 +30,38 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. *known-bugs* -------------------- Known bugs and current work ----------------------- -Revert changes to use splint, only support lint. -More warnings from gcc: - -Wextra gives too many, split up in individual args +dosbatch runtime files. (Mike Williams, 2009 May 27) -Type of sn_dev is int, should be dev_T and separate flag for being invalid. -Same for ffv_dev. +Reading past end of string. Patch from Dominique Pelle, 2009 May 17. -Patch for crash with dict free and previous_funccal. (Nico Weber, 2009 May 2, -new one May 3) -memory leak problem remaining. (Dominique Pelle, May 3) +Should have ":unsilent cmd", for ":silent argdo ... echo 'hello' ..." -Hang in edit.c. (Dominique Pelle, 2009 Apr 29) +Patch for folds messed up after reloading buffer in another tab. +(Lech Lorens, 2009 May 23) +Is this the right solution? -Should have ":unsilent cmd", for ":silent argdo ... echo 'hello' ..." +Patch for high-dpi awareness. (George Reilly, 2009 May 22) + +2 patches for Visual Studio 2010. (George Reilly, 2009 May 22) + +patch for using freed memory with ":redrawstatus". (Dominique Pelle, 2009 Jun +1) Link failure with hangul input feature. (Dominique Pelle, 2009 May 9) Patch by SunHyun Nam, May 11. Mark "hangulin" for removal? +Patch for photon. (Sean Boudreau, 2009 May 12) + +Patch for xz and lzma compression. (Richard Sherman, 2009 May 25) +Use lzma for both. +Add lzma support to gzip.vim. *.lzma "lzma -d", "lzma -z" +Ook *.xz. ".txz" -> ".tar.xz", ".tlz" -> ".tar.lzma" + +Screen redrawn only after delay. (Raulnac, 2009 May 28) + +Use cppcheck to find unused functions? + Dynamic Folding support for 2html.vim. (Benjamin Fritz, 2009 Feb 12) Crash in syntax HL code with jquery syntax. (George Reilly, 2009 Mar 24) @@ -62,6 +75,9 @@ Increase number of cscope connectsions from 8 to 42? (Robert Bragg, 2009 Apr Windows (Vista): download spell file doesn't work? (Chris Bogen, 2009 May 7) +In command line window ":close" doesn't work properly. (Tony Mechelynck, 2009 +Jun 1) + When a:base in 'completefunc' starts with a number it's passed as a number, not a string. (Sean Ma) Need to add flag to call_func_retlist() to force a string value. @@ -85,6 +101,9 @@ Needs more work. Problem with