diff options
author | Bram Moolenaar <Bram@vim.org> | 2007-05-10 16:56:30 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2007-05-10 16:56:30 +0000 |
commit | c1762ccb6f1e06daeb9e3af644384f2a33f8fd7f (patch) | |
tree | 70022a20ffa4ed75b811bfb86f9754ef65df6953 | |
parent | f1dc4965b51903f1235c4d1145c57ada40c517aa (diff) | |
download | vim-c1762ccb6f1e06daeb9e3af644384f2a33f8fd7f.zip |
updated for version 7.1b
-rw-r--r-- | runtime/autoload/gzip.vim | 70 | ||||
-rw-r--r-- | runtime/autoload/xml/xsl.vim | 19 | ||||
-rw-r--r-- | runtime/doc/map.txt | 4 | ||||
-rw-r--r-- | runtime/doc/usr_03.txt | 2 | ||||
-rw-r--r-- | runtime/doc/usr_43.txt | 2 | ||||
-rw-r--r-- | runtime/doc/version5.txt | 2 | ||||
-rw-r--r-- | runtime/syntax/ruby.vim | 252 | ||||
-rw-r--r-- | src/ex_docmd.c | 8 | ||||
-rw-r--r-- | src/vim.h | 4 |
9 files changed, 189 insertions, 174 deletions
diff --git a/runtime/autoload/gzip.vim b/runtime/autoload/gzip.vim index cf20238c8..f7c97a6d4 100644 --- a/runtime/autoload/gzip.vim +++ b/runtime/autoload/gzip.vim @@ -1,6 +1,6 @@ " Vim autoload file for editing compressed files. " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2006 Oct 09 +" Last Change: 2007 May 10 " These functions are used by the gzip plugin. @@ -63,6 +63,12 @@ fun gzip#read(cmd) " set 'modifiable' let ma_save = &ma setlocal ma + " Reset 'foldenable', otherwise line numbers get adjusted. + if has("folding") + let fen_save = &fen + setlocal nofen + endif + " when filtering the whole buffer, it will become empty let empty = line("'[") == 1 && line("']") == line("$") let tmp = tempname() @@ -74,42 +80,50 @@ fun gzip#read(cmd) if !filereadable(tmp) " uncompress didn't work! Keep the compressed file then. echoerr "Error: Could not read uncompressed file" - return - endif - " delete the compressed lines; remember the line number - let l = line("'[") - 1 - if exists(":lockmarks") - lockmarks '[,']d _ + let ok = 0 else - '[,']d _ - endif - " read in the uncompressed lines "'[-1r tmp" - " Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options. - setlocal nobin - if exists(":lockmarks") - if empty - execute "silent lockmarks " . l . "r ++edit " . tmp + let ok = 1 + " delete the compressed lines; remember the line number + let l = line("'[") - 1 + if exists(":lockmarks") + lockmarks '[,']d _ else - execute "silent lockmarks " . l . "r " . tmp + '[,']d _ + endif + " read in the uncompressed lines "'[-1r tmp" + " Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options. + setlocal nobin + if exists(":lockmarks") + if empty + execute "silent lockmarks " . l . "r ++edit " . tmp + else + execute "silent lockmarks " . l . "r " . tmp + endif + else + execute "silent " . l . "r " . tmp endif - else - execute "silent " . l . "r " . tmp - endif - " if buffer became empty, delete trailing blank line - if empty - silent $delete _ - 1 + " if buffer became empty, delete trailing blank line + if empty + silent $delete _ + 1 + endif + " delete the temp file and the used buffers + call delete(tmp) + silent! exe "bwipe " . tmp + silent! exe "bwipe " . tmpe endif - " delete the temp file and the used buffers - call delete(tmp) - silent! exe "bwipe " . tmp - silent! exe "bwipe " . tmpe + + " Restore saved option values. let &pm = pm_save let &cpo = cpo_save let &l:ma = ma_save + if has("folding") + let &l:fen = fen_save + endif + " When uncompressed the whole buffer, do autocommands - if empty + if ok && empty if &verbose >= 8 execute "doau BufReadPost " . expand("%:r") else diff --git a/runtime/autoload/xml/xsl.vim b/runtime/autoload/xml/xsl.vim index 5fce4779f..b8aa29daa 100644 --- a/runtime/autoload/xml/xsl.vim +++ b/runtime/autoload/xml/xsl.vim @@ -1,7 +1,9 @@ +" Author: Mikolaj Machowski, Thomas Bartel +" Last change: 2007 May 8 let g:xmldata_xsl = { \ 'apply-imports' : [[], {}], \ 'apply-templates' : [['sort', 'with-param'], {'select' : [], 'mode' : []}], - \ 'attribute' : [[], {'name' : [], 'namespace' : []}], + \ 'attribute' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'namespace' : []}], \ 'attribute-set' : [['attribute'], {'name' : [], 'use-attribute-sets' : []}], \ 'call-template' : [['with-param'], {'name' : []}], \ 'choose' : [['when', 'otherwise'], {}], @@ -9,10 +11,10 @@ let g:xmldata_xsl = { \ 'copy' : [[], {'use-attribute-sets' : []}], \ 'copy-of' : [[], {'select' : []}], \ 'decimal-format' : [[], {'name' : [], 'decimal-separator' : [], 'grouping-separator' : [], 'infinity' : [], 'minus-sign' : [], 'NaN' : [], 'percent' : [], 'per-mille' : [], 'zero-digit' : [], 'digit' : [], 'pattern-separator' : []}], - \ 'element' : [[], {'name' : [], 'namespace' : [], 'use-attribute-sets' : []}], + \ 'element' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'namespace' : [], 'use-attribute-sets' : []}], \ 'fallback' : [[], {}], \ 'for-each' : [['sort'], {'select' : []}], - \ 'if' : [[], {'test' : []}], + \ 'if' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'test' : []}], \ 'import' : [[], {'href' : []}], \ 'include' : [[], {'href' : []}], \ 'key' : [[], {'name' : [], 'match' : [], 'use' : []}], @@ -21,17 +23,16 @@ let g:xmldata_xsl = { \ 'number' : [[], {'level' : ['single', 'multiple', 'any'], 'count' : [], 'from' : [], 'value' : [], 'format' : [], 'lang' : [], 'letter-value' : ['alphabetic', 'traditional'], 'grouping-separator' : [], 'grouping-size' : []}], \ 'otherwise' : [[], {}], \ 'output' : [[], {'method' : ['xml', 'html', 'text'], 'version' : [], 'encoding' : [], 'omit-xml-declaration' : ['yes', 'no'], 'standalone' : ['yes', 'no'], 'doctype-public' : [], 'doctype-system' : [], 'cdata-section-elements' : [], 'indent' : ['yes', 'no'], 'media-type' : []}], - \ 'param' : [[], {'name' : [], 'select' : []}], + \ 'param' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}], \ 'preserve-space' : [[], {'elements' : []}], - \ 'processing-instruction' : [[], {'name' : []}], + \ 'processing-instructionruction' : [[], {'name' : []}], \ 'sort' : [[], {'select' : [], 'lang' : [], 'data-type' : ['text', 'number'], 'order' : ['ascending', 'descending'], 'case-order' : ['upper-first', 'lower-first']}], \ 'strip-space' : [[], {'elements' : []}], \ 'stylesheet' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'version' : []}], - \ 'template' : [['param'], {'match' : [], 'name' : [], 'priority' : [], 'mode' : []}], + \ 'template' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'match' : [], 'name' : [], 'priority' : [], 'mode' : []}], \ 'text' : [[], {'disable-output-escaping' : ['yes', 'no']}], \ 'transform' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'exclude-result-prefixes' : [], 'version' : []}], \ 'value-of' : [[], {'select' : [], 'disable-output-escaping' : ['yes', 'no']}], - \ 'variable' : [[], {'name' : [], 'select' : []}], + \ 'variable' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}], \ 'when' : [[], {'test' : []}], - \ 'with-param' : [[], {'name' : [], 'select' : []}]} - + \ 'with-param' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}]} diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 73221e696..90f88004c 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 7.1a. Last change: 2007 Mar 24 +*map.txt* For Vim version 7.1b. Last change: 2007 May 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -792,7 +792,7 @@ stands for. This can be used to save typing for often used long words. And you can use it to automatically correct obvious spelling errors. Examples: - :iab ms MicroSoft + :iab ms Microsoft :iab tihs this There are three types of abbreviations: diff --git a/runtime/doc/usr_03.txt b/runtime/doc/usr_03.txt index b082f83cb..443773dc4 100644 --- a/runtime/doc/usr_03.txt +++ b/runtime/doc/usr_03.txt @@ -1,4 +1,4 @@ -*usr_03.txt* For Vim version 7.1a. Last change: 2006 Jun 21 +*usr_03.txt* For Vim version 7.1b. Last change: 2006 Jun 21 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_43.txt b/runtime/doc/usr_43.txt index 064f17ca9..25cf37f01 100644 --- a/runtime/doc/usr_43.txt +++ b/runtime/doc/usr_43.txt @@ -1,4 +1,4 @@ -*usr_43.txt* For Vim version 7.1a. Last change: 2006 Apr 24 +*usr_43.txt* For Vim version 7.1b. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/version5.txt b/runtime/doc/version5.txt index 503cde476..408c2e38c 100644 --- a/runtime/doc/version5.txt +++ b/runtime/doc/version5.txt @@ -1,4 +1,4 @@ -*version5.txt* For Vim version 7.1a. Last change: 2006 Nov 18 +*version5.txt* For Vim version 7.1b. Last change: 2006 Nov 18 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/syntax/ruby.vim b/runtime/syntax/ruby.vim index c45aae2a1..42a88f475 100644 --- a/runtime/syntax/ruby.vim +++ b/runtime/syntax/ruby.vim @@ -11,11 +11,7 @@ " Thanks to perl.vim authors, and to Reimer Behrends. :-) (MN) " ---------------------------------------------------------------------------- -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif @@ -34,9 +30,9 @@ endif " Operators if exists("ruby_operators") - syn match rubyOperator "\%(\^\|\~\|\%(class\s*\)\@<!<<\|<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|>\||\|-\|/\|\*\*\|\*\|&\|%\|+\)" - syn match rubyPseudoOperator "\%(-=\|/=\|\*\*=\|\*=\|&&\|&=\|&&=\|||\||=\|||=\|%=\|+=\|!\~\|!=\)" - syn region rubyBracketOperator matchgroup=rubyOperator start="\%([_[:lower:]]\w*[?!=]\=\|}\)\@<=\[\s*" end="\s*]" + syn match rubyOperator "\%([~!^&|*/%+-]\|\%(class\s*\)\@<!<<\|<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|=\@<!>\|\*\*\|\.\.\.\|\.\.\|::\)" + syn match rubyPseudoOperator "\%(-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=\)" + syn region rubyBracketOperator matchgroup=rubyOperator start="\%([_[:lower:]]\w*[?!=]\=\|[})]\)\@<=\[\s*" end="\s*]" contains=TOP endif " Expression Substitution and Backslash Notation @@ -46,22 +42,29 @@ syn match rubyEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\) syn region rubyInterpolation matchgroup=rubyInterpolationDelimiter start="#{" end="}" contained contains=TOP syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=rubyInterpolationDelimiter,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable,rubyPredefinedVariable syn match rubyInterpolationDelimiter "#\ze\%(\$\|@@\=\)\w\+" display contained +syn match rubyInterpolation "#\$\%(-\w\|\W\)" display contained contains=rubyInterpolationDelimiter,rubyPredefinedVariable,rubyInvalidVariable +syn match rubyInterpolationDelimiter "#\ze\$\%(-\w\|\W\)" display contained syn region rubyNoInterpolation start="\\#{" end="}" contained syn match rubyNoInterpolation "\\#{" display contained syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained +syn match rubyNoInterpolation "\\#\$\W" display contained syn match rubyDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE syn region rubyNestedParentheses start="(" end=")" skip="\\\\\|\\)" transparent contained contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape syn region rubyNestedCurlyBraces start="{" end="}" skip="\\\\\|\\}" transparent contained contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape syn region rubyNestedAngleBrackets start="<" end=">" skip="\\\\\|\\>" transparent contained contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape -syn region rubyNestedSquareBrackets start="\[" end="\]" skip="\\\\\|\\\]" transparent contained contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape +if exists("ruby_operators") + syn region rubyNestedSquareBrackets start="\[" end="\]" skip="\\\\\|\\\]" transparent contained contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape +else + syn region rubyNestedSquareBrackets start="\[" end="\]" skip="\\\\\|\\\]" transparent containedin=rubyArrayLiteral contained contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape +endif syn cluster rubyStringSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyEscape syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedParentheses,rubyNestedCurlyBraces,rubyNestedAngleBrackets,rubyNestedSquareBrackets " Numbers and ASCII Codes -syn match rubyASCIICode "\w\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)" +syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)" syn match rubyInteger "\<0[xX]\x\+\%(_\x\+\)*\>" display syn match rubyInteger "\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display syn match rubyInteger "\<0[oO]\=\o\+\%(_\o\+\)*\>" display @@ -77,17 +80,17 @@ syn match rubyConstant "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\ syn match rubyClassVariable "@@\h\w*" display syn match rubyInstanceVariable "@\h\w*" display syn match rubyGlobalVariable "$\%(\h\w*\|-.\)" -syn match rubySymbol ":\@<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|==\|=\~\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" -syn match rubySymbol ":\@<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)" -syn match rubySymbol ":\@<!:\%(\$\|@@\=\)\=\h\w*[?!=]\=" -syn region rubySymbol start=":\@<!:\"" end="\"" skip="\\\\\|\\\"" -syn region rubySymbol start=":\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold -if exists("ruby_operators") - syn match rubyBlockParameter "\%(\%(\%(\<do\>\|{\)\s*\)|\s*\)\@<=[( ,a-zA-Z0-9_*)]\+\%(\s*|\)\@=" display -else - syn match rubyBlockParameter "\%(\%(\<do\>\|{\)\s*\)\@<=|\s*\zs[( ,a-zA-Z0-9_*)]\+\ze\s*|" display -endif +syn match rubySymbol "[]})\"':]\@<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|==\|=\~\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" +syn match rubySymbol "[]})\"':]\@<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)" +syn match rubySymbol "[]})\"':]\@<!:\%(\$\|@@\=\)\=\h\w*" +syn match rubySymbol "[]})\"':]\@<!:\h\w*[?!=]\=" +syn region rubySymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" +syn region rubySymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold +syn match rubyBlockParameter "\h\w*" contained +syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\s*\)\@<=|" end="|" oneline display contains=rubyBlockParameter + +syn match rubyInvalidVariable "$[^ A-Za-z-]" syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~1-9]# syn match rubyPredefinedVariable "$_\>" display syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>" display @@ -101,8 +104,8 @@ syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(RUBY_VERSI "syn match rubyPredefinedConstant "\%(::\)\=\zs\%(NotImplementError\)\>" " Normal Regular Expression -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\)\|[;\~=!|&(,[>]\)\s*\)\@<=/" end="/[iomx]*" skip="\\\\\|\\/" contains=@rubyStringSpecial fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\<\%(split\|scan\|gsub\|sub\)\s*\)\@<=/" end="/[iomx]*" skip="\\\\\|\\/" contains=@rubyStringSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[>]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyStringSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\<\%(split\|scan\|gsub\|sub\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyStringSpecial fold " Normal String and Shell Command Output syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold @@ -110,18 +113,23 @@ syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\ syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold " Generalized Regular Expression -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomx]*" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomx]*" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomx]*" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomx]*" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomx]*" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold " Generalized Single Quoted String, Symbol and Array of Strings -syn region rubyString matchgroup=rubyStringDelimiter start="%[qsw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold -syn region rubyString matchgroup=rubyStringDelimiter start="%[qsw]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape -syn region rubyString matchgroup=rubyStringDelimiter start="%[qsw]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape -syn region rubyString matchgroup=rubyStringDelimiter start="%[qsw]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape -syn region rubyString matchgroup=rubyStringDelimiter start="%[qsw](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qw](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape +syn region rubySymbol start="%[s]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold +syn region rubySymbol start="%[s]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape +syn region rubySymbol start="%[s]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape +syn region rubySymbol start="%[s]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape +syn region rubySymbol start="%[s](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape " Generalized Double Quoted String and Array of Strings and Shell Command Output " Note: %= is not matched here as the beginning of a double quoted string @@ -133,20 +141,20 @@ syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=\[" e syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold " Here Document -syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-\=\zs\%(\h\w*\)+ end=+$+ oneline contains=TOP -syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=TOP -syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-\=\zs'\%([^']*\)'+ end=+$+ oneline contains=TOP -syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=TOP +syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs\%(\h\w*\)+ end=+$+ oneline contains=TOP +syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=TOP +syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs'\%([^']*\)'+ end=+$+ oneline contains=TOP +syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=TOP -syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<\z(\h\w*\)\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend -syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<"\z([^"]*\)"\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend -syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<'\z([^']*\)'\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart fold keepend -syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<`\z([^`]*\)`\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend +syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<\z(\h\w*\)\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend +syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<"\z([^"]*\)"\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend +syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<'\z([^']*\)'\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart fold keepend +syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<`\z([^`]*\)`\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend -syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-\z(\h\w*\)\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend -syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-"\z([^"]*\)"\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend -syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-'\z([^']*\)'\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart fold keepend -syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-`\z([^`]*\)`\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend +syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-\z(\h\w*\)\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend +syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-"\z([^"]*\)"\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend +syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-'\z([^']*\)'\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart fold keepend +syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-`\z([^`]*\)`\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend if exists('main_syntax') && main_syntax == 'eruby' let b:ruby_no_expensive = 1 @@ -160,7 +168,9 @@ syn match rubyModuleDeclaration "[^[:space:];#]\+" contained contains=rubyC syn match rubyFunction "\<[_[:alpha:]][_[:alnum:]]*[?!=]\=[[:alnum:].:?!=]\@!" contained containedin=rubyMethodDeclaration syn match rubyFunction "\%(\s\|^\)\@<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2 syn match rubyFunction "\%([[:space:].]\|^\)\@<=\%(\[\]=\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|==\|=\~\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration -" Expensive Mode - colorize *end* according to opening statement + +" Expensive Mode - match 'end' with the appropriate opening keyword for syntax +" based folding and special highlighting of module/class/method definitions if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") syn match rubyDefine "\<alias\>" nextgroup=rubyAliasDeclaration skipwhite skipnl syn match rubyDefine "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl @@ -171,25 +181,25 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") syn region rubyBlock start="\<module\>" matchgroup=rubyModule end="\<end\>" contains=TOP fold " modifiers - syn match rubyConditional "\<\%(if\|unless\)\>" display - syn match rubyRepeat "\<\%(while\|until\)\>" display + syn match rubyConditionalModifier "\<\%(if\|unless\)\>" display + syn match rubyRepeatModifier "\<\%(while\|until\)\>" display - " *do* requiring *end* syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=TOP fold + " curly bracket block or hash literal + syn region rubyCurlyBlock start="{" end="}" contains=TOP fold + syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=TOP fold - " *{* requiring *}* - syn region rubyCurlyBlock start="{" end="}" contains=TOP fold + " statements without 'do' + syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=TOP fold + syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=TOP fold + syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!?]\)\s*\)\@<=\%(if\|unless\)\>" end="\<end\>" contains=TOP fold - " statements without *do* - syn region rubyNoDoBlock matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=TOP fold - syn region rubyCaseBlock matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=TOP fold - syn region rubyConditionalBlock matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\%(if\|unless\)\>" end="\<end\>" contains=TOP fold - syn keyword rubyConditional then else when contained containedin=rubyCaseBlock - syn keyword rubyConditional then else elsif contained containedin=rubyConditionalBlock + syn keyword rubyConditional then else when contained containedin=rubyCaseExpression + syn keyword rubyConditional then else elsif contained containedin=rubyConditionalExpression - " statement with optional *do* - syn region rubyOptDoLine matchgroup=rubyRepeat start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" end="\%(\<do\>\|:\)" end="\ze\%(;\|$\)" oneline contains=TOP - syn region rubyOptDoBlock start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=TOP nextgroup=rubyOptDoLine fold + " statements with optional 'do' + syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyOptionalDo end="\%(\<do\>\)" end="\ze\%(;\|$\)" oneline contains=TOP + syn region rubyRepeatExpression start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=TOP nextgroup=rubyOptionalDoLine fold if !exists("ruby_minlines") let ruby_minlines = 50 @@ -227,11 +237,11 @@ endif " Comments and Documentation syn match rubySharpBang "\%^#!.*" display -syn keyword rubyTodo FIXME NOTE TODO XXX contained +syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE XXX contained syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell if !exists("ruby_no_comment_fold") syn region rubyMultilineComment start="\%(\%(^\s*#.*\n\)\@<!\%(^\s*#.*\n\)\)\%(\(^\s*#.*\n\)\{1,}\)\@=" end="\%(^\s*#.*\n\)\@<=\%(^\s*#.*\n\)\%(^\s*#\)\@!" contains=rubyComment transparent fold keepend - syn region rubyDocumentation start="^=begin\s*$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell fold + syn region rubyDocumentation start="^=begin\ze\%(\s.*\)\=$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell fold else syn region rubyDocumentation start="^=begin\s*$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell endif @@ -252,72 +262,62 @@ syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(public\|require\|rai " __END__ Directive syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" fold -" Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_ruby_syntax_inits") - if version < 508 - let did_ruby_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink rubyClass rubyDefine - HiLink rubyModule rubyDefine - HiLink rubyDefine Define - HiLink rubyFunction Function - HiLink rubyConditional Conditional - HiLink rubyRepeat Repeat - HiLink rubyControl Statement - HiLink rubyInclude Include - HiLink rubyInteger Number - HiLink rubyASCIICode Character - HiLink rubyFloat Float - HiLink rubyBoolean Boolean - HiLink rubyException Exception - if !exists("ruby_no_identifiers") - HiLink rubyIdentifier Identifier - else - HiLink rubyIdentifier NONE - endif - HiLink rubyClassVariable rubyIdentifier - HiLink rubyConstant Type - HiLink rubyGlobalVariable rubyIdentifier - HiLink rubyBlockParameter rubyIdentifier - HiLink rubyInstanceVariable rubyIdentifier - HiLink rubyPredefinedIdentifier rubyIdentifier - HiLink rubyPredefinedConstant rubyPredefinedIdentifier - HiLink rubyPredefinedVariable rubyPredefinedIdentifier - HiLink rubySymbol Constant - HiLink rubyKeyword Keyword - HiLink rubyOperator Operator - HiLink rubyPseudoOperator rubyOperator - HiLink rubyBeginEnd Statement - HiLink rubyAccess Statement - HiLink rubyAttribute Statement - HiLink rubyEval Statement - HiLink rubyPseudoVariable Constant - - HiLink rubyComment Comment - HiLink rubyData Comment - HiLink rubyDataDirective Delimiter - HiLink rubyDocumentation Comment - HiLink rubyEscape Special - HiLink rubyInterpolationDelimiter Delimiter - HiLink rubyNoInterpolation rubyString - HiLink rubySharpBang PreProc - HiLink rubyRegexpDelimiter rubyStringDelimiter - HiLink rubyStringDelimiter Delimiter - HiLink rubyRegexp rubyString - HiLink rubyString String - HiLink rubyTodo Todo - - HiLink rubyError Error - HiLink rubySpaceError rubyError - - delcommand HiLink +hi def link rubyClass rubyDefine +hi def link rubyModule rubyDefine +hi def link rubyDefine Define +hi def link rubyFunction Function +hi def link rubyConditional Conditional +hi def link rubyConditionalModifier rubyConditional +hi def link rubyRepeat Repeat +hi def link rubyRepeatModifier rubyRepeat +hi def link rubyOptionalDo rubyRepeat +hi def link rubyControl Statement +hi def link rubyInclude Include +hi def link rubyInteger Number +hi def link rubyASCIICode Character +hi def link rubyFloat Float +hi def link rubyBoolean Boolean +hi def link rubyException Exception +if !exists("ruby_no_identifiers") + hi def link rubyIdentifier Identifier +else + hi def link rubyIdentifier NONE endif +hi def link rubyClassVariable rubyIdentifier +hi def link rubyConstant Type +hi def link rubyGlobalVariable rubyIdentifier +hi def link rubyBlockParameter rubyIdentifier +hi def link rubyInstanceVariable rubyIdentifier +hi def link rubyPredefinedIdentifier rubyIdentifier +hi def link rubyPredefinedConstant rubyPredefinedIdentifier +hi def link rubyPredefinedVariable rubyPredefinedIdentifier +hi def link rubySymbol Constant +hi def link rubyKeyword Keyword +hi def link rubyOperator Operator +hi def link rubyPseudoOperator rubyOperator +hi def link rubyBeginEnd Statement +hi def link rubyAccess Statement +hi def link rubyAttribute Statement +hi def link rubyEval Statement +hi def link rubyPseudoVariable Constant + +hi def link rubyComment Comment +hi def link rubyData Comment +hi def link rubyDataDirective Delimiter +hi def link rubyDocumentation Comment +hi def link rubyEscape Special +hi def link rubyInterpolationDelimiter Delimiter +hi def link rubyNoInterpolation rubyString +hi def link rubySharpBang PreProc +hi def link rubyRegexpDelimiter rubyStringDelimiter +hi def link rubyStringDelimiter Delimiter +hi def link rubyRegexp rubyString +hi def link rubyString String +hi def link rubyTodo Todo + +hi def link rubyInvalidVariable Error +hi def link rubyError Error +hi def link rubySpaceError rubyError let b:current_syntax = "ruby" diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 37d9f9fb0..0967a7e74 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -1240,7 +1240,7 @@ do_cmdline(cmdline, getline, cookie, flags) trylevel = initial_trylevel + cstack.cs_trylevel; /* - * If the outermost try conditional (accross function calls and sourced + * If the outermost try conditional (across function calls and sourced * files) is aborted because of an error, an interrupt, or an uncaught * exception, cancel everything. If it is left normally, reset * force_abort to get the non-EH compatible abortion behavior for @@ -1593,8 +1593,8 @@ getline_equal(fgetline, cookie, func) struct loop_cookie *cp; /* When "fgetline" is "get_loop_line()" use the "cookie" to find the - * function that's orignally used to obtain the lines. This may be nested - * several levels. */ + * function that's originally used to obtain the lines. This may be + * nested several levels. */ gp = fgetline; cp = (struct loop_cookie *)cookie; while (gp == get_loop_line) @@ -1624,7 +1624,7 @@ getline_cookie(fgetline, cookie) struct loop_cookie *cp; /* When "fgetline" is "get_loop_line()" use the "cookie" to find the - * cookie that's orignally used to obtain the lines. This may be nested + * cookie that's originally used to obtain the lines. This may be nested * several levels. */ gp = fgetline; cp = (struct loop_cookie *)cookie; @@ -33,7 +33,7 @@ # define HAVE_PATHDEF /* - * Check if configure correcly managed to find sizeof(int). If this failed, + * Check if configure correctly managed to find sizeof(int). If this failed, * it becomes zero. This is likely a problem of not being able to run the * test program. Other items from configure may also be wrong then! */ @@ -42,7 +42,7 @@ # endif /* - * Cygwin may have fchdir() in a newer rleease, but in most versions it + * Cygwin may have fchdir() in a newer release, but in most versions it * doesn't work well and avoiding it keeps the binary backward compatible. */ # if defined(__CYGWIN32__) && defined(HAVE_FCHDIR) |