diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-05-18 21:49:28 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-05-18 21:49:28 +0200 |
commit | 8e52a593765172de0f4d98a849d6d89d024b971e (patch) | |
tree | 835eaca57a3432e958820b1a994ffa410dd24572 /runtime/indent | |
parent | bd1d5608952dd1c61f99f9b2f605610405415622 (diff) |
Fix more 'cpo' issues in runtime files.
Diffstat (limited to 'runtime/indent')
-rw-r--r-- | runtime/indent/cmake.vim | 5 | ||||
-rw-r--r-- | runtime/indent/css.vim | 5 | ||||
-rw-r--r-- | runtime/indent/eiffel.vim | 7 | ||||
-rw-r--r-- | runtime/indent/idlang.vim | 5 | ||||
-rw-r--r-- | runtime/indent/java.vim | 7 | ||||
-rw-r--r-- | runtime/indent/mp.vim | 7 | ||||
-rw-r--r-- | runtime/indent/occam.vim | 5 | ||||
-rw-r--r-- | runtime/indent/sqlanywhere.vim | 5 | ||||
-rw-r--r-- | runtime/indent/vim.vim | 7 | ||||
-rw-r--r-- | runtime/indent/xinetd.vim | 5 | ||||
-rw-r--r-- | runtime/indent/xml.vim | 9 | ||||
-rw-r--r-- | runtime/indent/zimbu.vim | 9 |
12 files changed, 64 insertions, 12 deletions
diff --git a/runtime/indent/cmake.vim b/runtime/indent/cmake.vim index 8c408fb1ec..421afcb6d7 100644 --- a/runtime/indent/cmake.vim +++ b/runtime/indent/cmake.vim @@ -23,6 +23,8 @@ setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE( if exists("*CMakeGetIndent") finish endif +let s:keepcpo= &cpo +set cpo&vim fun! CMakeGetIndent(lnum) let this_line = getline(a:lnum) @@ -83,3 +85,6 @@ fun! CMakeGetIndent(lnum) return ind endfun + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/indent/css.vim b/runtime/indent/css.vim index 2a09566e1a..f85bb05acb 100644 --- a/runtime/indent/css.vim +++ b/runtime/indent/css.vim @@ -15,6 +15,8 @@ setlocal nosmartindent if exists("*GetCSSIndent") finish endif +let s:keepcpo= &cpo +set cpo&vim function s:prevnonblanknoncomment(lnum) let lnum = a:lnum @@ -74,3 +76,6 @@ function GetCSSIndent() return indent(pnum) + s:count_braces(pnum, 1) * &sw \ - s:count_braces(v:lnum, 0) * &sw endfunction + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/indent/eiffel.vim b/runtime/indent/eiffel.vim index db66bf8fea..472665275b 100644 --- a/runtime/indent/eiffel.vim +++ b/runtime/indent/eiffel.vim @@ -5,7 +5,7 @@ " $Date: 2004/12/09 21:33:52 $ " $Revision: 1.3 $ " URL: http://www.djoce.net/page/vim/ -" Last Change: 2004 Sept 14 : removed specific value for tab (sw) +" Last Change: 2012 May 18 " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -37,6 +37,8 @@ let s:inheritance_dent = '\s*\(redefine\|rename\|export\)\>' if exists("*GetEiffelIndent") finish endif +let s:keepcpo= &cpo +set cpo&vim function GetEiffelIndent() @@ -103,4 +105,7 @@ function GetEiffelIndent() return ind endfunction +let &cpo = s:keepcpo +unlet s:keepcpo + " vim:sw=2 diff --git a/runtime/indent/idlang.vim b/runtime/indent/idlang.vim index 97c31ada58..b4c6ae6fea 100644 --- a/runtime/indent/idlang.vim +++ b/runtime/indent/idlang.vim @@ -1,6 +1,6 @@ " IDL (Interactive Data Language) indent file. " Language: IDL (ft=idlang) -" Last change: 2002 Sep 23 +" Last change: 2012 May 18 " Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com> " Only load this indent file when no other was loaded. @@ -9,8 +9,7 @@ if exists("b:did_indent") endif let b:did_indent = 1 -setlocal indentkeys=o,O,0=endif,0=ENDIF,0=endelse,0=ENDELSE,0=endwhile, - \0=ENDWHILE,0=endfor,0=ENDFOR,0=endrep,0=ENDREP +setlocal indentkeys=o,O,0=endif,0=ENDIF,0=endelse,0=ENDELSE,0=endwhile,0=ENDWHILE,0=endfor,0=ENDFOR,0=endrep,0=ENDREP setlocal indentexpr=GetIdlangIndent(v:lnum) diff --git a/runtime/indent/java.vim b/runtime/indent/java.vim index 3c48d3e35f..e0aec0faef 100644 --- a/runtime/indent/java.vim +++ b/runtime/indent/java.vim @@ -2,7 +2,7 @@ " Language: Java " Previous Maintainer: Toby Allsopp <toby.allsopp@peace.com> " Current Maintainer: Hong Xu <xuhdev@gmail.com> -" Last Change: 2012 Jan 20 +" Last Change: 2012 May 18 " Version: 1.0 " License: Same as Vim. " Copyright (c) 2012 Hong Xu @@ -29,6 +29,8 @@ let b:undo_indent = "set cin< cino< indentkeys< indentexpr<" if exists("*GetJavaIndent") finish endif +let s:keepcpo= &cpo +set cpo&vim function! SkipJavaBlanksAndComments(startline) let lnum = a:startline @@ -139,4 +141,7 @@ function GetJavaIndent() return theIndent endfunction +let &cpo = s:keepcpo +unlet s:keepcpo + " vi: sw=2 et diff --git a/runtime/indent/mp.vim b/runtime/indent/mp.vim index 1aea4f809c..a118eb8b60 100644 --- a/runtime/indent/mp.vim +++ b/runtime/indent/mp.vim @@ -1,7 +1,7 @@ " MetaPost indent file " Language: MetaPost " Maintainer: Eugene Minkovskii <emin@mccme.ru> -" Last Change: 2003 Nov 21 +" Last Change: 2012 May 18 " Version: 0.1 " ========================================================================== @@ -56,6 +56,8 @@ setlocal indentkeys+=;,<:>,=if,=for,=def,=end,=else,=fi if exists("*GetMetaPostIndent") finish endif +let s:keepcpo= &cpo +set cpo&vim " Auxiliary Definitions: {{{1 function! MetaNextNonblankNoncomment(pos) @@ -203,4 +205,7 @@ function! GetMetaPostIndent() endfunction " +let &cpo = s:keepcpo +unlet s:keepcpo + " vim:sw=2:fdm=marker diff --git a/runtime/indent/occam.vim b/runtime/indent/occam.vim index ba978e0069..bebb0528bb 100644 --- a/runtime/indent/occam.vim +++ b/runtime/indent/occam.vim @@ -20,6 +20,8 @@ setlocal indentkeys=o,O,0=: if exists("*GetOccamIndent") finish endif +let s:keepcpo= &cpo +set cpo&vim "{{{ Indent definitions " Define carriage return indent @@ -180,3 +182,6 @@ function GetOccamIndent() endfunction "}}} + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/indent/sqlanywhere.vim b/runtime/indent/sqlanywhere.vim index fdafb622e5..afc312f8e0 100644 --- a/runtime/indent/sqlanywhere.vim +++ b/runtime/indent/sqlanywhere.vim @@ -48,6 +48,8 @@ setlocal indentexpr=GetSQLIndent() if exists("*GetSQLIndent") finish endif +let s:keepcpo= &cpo +set cpo&vim " List of all the statements that start a new block. " These are typically words that start a line. @@ -382,4 +384,7 @@ function GetSQLIndent() return s:ModuloIndent(ind) endfunction +let &cpo = s:keepcpo +unlet s:keepcpo + " vim:sw=4: diff --git a/runtime/indent/vim.vim b/runtime/indent/vim.vim index 40117a0070..8281d94c09 100644 --- a/runtime/indent/vim.vim +++ b/runtime/indent/vim.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Vim script " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2011 Mar 22 +" Last Change: 2012 May 18 " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -16,6 +16,8 @@ setlocal indentkeys+==end,=else,=cat,=fina,=END,0\\ if exists("*GetVimIndent") finish endif +let s:keepcpo= &cpo +set cpo&vim function GetVimIndent() " Find a non-blank line above the current line. @@ -79,4 +81,7 @@ function GetVimIndent() return ind endfunction +let &cpo = s:keepcpo +unlet s:keepcpo + " vim:sw=2 diff --git a/runtime/indent/xinetd.vim b/runtime/indent/xinetd.vim index f7a5341448..c8127237e8 100644 --- a/runtime/indent/xinetd.vim +++ b/runtime/indent/xinetd.vim @@ -15,6 +15,8 @@ setlocal nosmartindent if exists("*GetXinetdIndent") finish endif +let s:keepcpo= &cpo +set cpo&vim function s:count_braces(lnum, count_open) let n_open = 0 @@ -48,3 +50,6 @@ function GetXinetdIndent() return indent(pnum) + s:count_braces(pnum, 1) * &sw \ - s:count_braces(v:lnum, 0) * &sw endfunction + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/indent/xml.vim b/runtime/indent/xml.vim index 4ac35b6af1..319dc39160 100644 --- a/runtime/indent/xml.vim +++ b/runtime/indent/xml.vim @@ -1,6 +1,6 @@ " Language: xml " Maintainer: Johannes Zellner <johannes@zellner.org> -" Last Change: 2009-05-26 00:17:25 +" Last Change: 2012 May 18 " Notes: 1) does not indent pure non-xml code (e.g. embedded scripts) " 2) will be confused by unbalanced tags in comments " or CDATA sections. @@ -12,13 +12,13 @@ if exists("b:did_indent") finish endif let b:did_indent = 1 +let s:keepcpo= &cpo +set cpo&vim " [-- local settings (must come before aborting the script) --] setlocal indentexpr=XmlIndentGet(v:lnum,1) setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,} -set cpo-=C - if !exists('b:xml_indent_open') let b:xml_indent_open = '.\{-}<\a' " pre tag, e.g. <address> @@ -93,4 +93,7 @@ fun! XmlIndentGet(lnum, use_syntax_check) return ind endfun +let &cpo = s:keepcpo +unlet s:keepcpo + " vim:ts=8 diff --git a/runtime/indent/zimbu.vim b/runtime/indent/zimbu.vim index a01510ded5..8df0eebe6f 100644 --- a/runtime/indent/zimbu.vim +++ b/runtime/indent/zimbu.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Zimbu " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2012 May 17 +" Last Change: 2011 Jun 19 " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -16,13 +16,16 @@ setlocal indentkeys=0{,0},!^F,o,O,0=ELSE,0=ELSEIF,0=CASE,0=DEFAULT,0=FINALLY " We impose recommended defaults: no Tabs, 'shiftwidth' = 2 setlocal sw=2 et -let b:undo_indent = "setl et< ai< indentexpr=" +let b:undo_indent = "setl et< sw< ai< indentkeys< indentexpr=" " Only define the function once. if exists("*GetZimbuIndent") finish endif +let s:cpo_save = &cpo +set cpo&vim + " Come here when loading the script the first time. let s:maxoff = 50 " maximum number of lines to look backwards for () @@ -121,3 +124,5 @@ func GetZimbuIndent(lnum) return plindent endfunc +let &cpo = s:cpo_save +unlet s:cpo_save |