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 /runtime/autoload | |
parent | f1dc4965b51903f1235c4d1145c57ada40c517aa (diff) | |
download | vim-git-c1762ccb6f1e06daeb9e3af644384f2a33f8fd7f.tar.gz |
updated for version 7.1b
Diffstat (limited to 'runtime/autoload')
-rw-r--r-- | runtime/autoload/gzip.vim | 70 | ||||
-rw-r--r-- | runtime/autoload/xml/xsl.vim | 19 |
2 files changed, 52 insertions, 37 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' : []}]} |