Skip to content

Commit cfbdc48

Browse files
committed
Fixed compatible mode in most runtime files.
1 parent fbda4db commit cfbdc48

37 files changed

+226
-46
lines changed

runtime/autoload/ada.vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
if version < 700
3030
finish
3131
endif
32+
let s:keepcpo= &cpo
33+
set cpo&vim
3234

3335
" Section: Constants {{{1
3436
"
@@ -619,6 +621,9 @@ lockvar g:ada#Comment
619621
lockvar! g:ada#Keywords
620622
lockvar! g:ada#Ctags_Kinds
621623

624+
let &cpo = s:keepcpo
625+
unlet s:keepcpo
626+
622627
finish " 1}}}
623628

624629
"------------------------------------------------------------------------------

runtime/compiler/cs.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
" Compiler: Microsoft Visual Studio C#
33
" Maintainer: Zhou YiChao ([email protected])
44
" Previous Maintainer: Joseph H. Yao ([email protected])
5-
" Last Change: 2011 Apr 21
5+
" Last Change: 2012 Apr 30
66

77
if exists("current_compiler")
88
finish
99
endif
1010
let current_compiler = "cs"
11+
let s:keepcpo= &cpo
12+
set cpo&vim
1113

1214
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
1315
command -nargs=* CompilerSet setlocal <args>
@@ -19,3 +21,6 @@ CompilerSet errorformat+=%f(%l\\,%v):\ %t%*[^:]:\ %m,
1921
\%tarning%*[^:]:\ %m
2022

2123
CompilerSet makeprg=csc\ %
24+
25+
let &cpo = s:keepcpo
26+
unlet s:keepcpo

runtime/compiler/decada.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
" Help Page: compiler-decada
1616
"------------------------------------------------------------------------------
1717

18+
let s:keepcpo= &cpo
19+
set cpo&vim
20+
1821
if (exists("current_compiler") &&
1922
\ current_compiler == "decada") ||
2023
\ version < 700
@@ -44,6 +47,9 @@ endif
4447
execute "CompilerSet makeprg=" . escape (g:decada.Make_Command, ' ')
4548
execute "CompilerSet errorformat=" . escape (g:decada.Error_Format, ' ')
4649

50+
let &cpo = s:keepcpo
51+
unlet s:keepcpo
52+
4753
finish " 1}}}
4854

4955
"------------------------------------------------------------------------------

runtime/compiler/g95.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Compiler: G95
22
" Maintainer: H Xu <[email protected]>
33
" Version: 0.1.3
4-
" Last Change: 2011 Apr 01
4+
" Last Change: 2012 Apr 30
55
" Homepage: http://www.vim.org/scripts/script.php?script_id=3492
66
" https://bitbucket.org/xuhdev/compiler-g95.vim
77
" License: Same as Vim
@@ -10,6 +10,8 @@ if exists('current_compiler')
1010
finish
1111
endif
1212
let current_compiler = 'g95'
13+
let s:keepcpo= &cpo
14+
set cpo&vim
1315

1416
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
1517
command -nargs=* CompilerSet setlocal <args>
@@ -21,3 +23,6 @@ CompilerSet errorformat=
2123
\%-Z%trror:\ %m,
2224
\%-Z%tarning\ (%n):\ %m,
2325
\%-C%.%#
26+
27+
let &cpo = s:keepcpo
28+
unlet s:keepcpo

runtime/compiler/gfortran.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Compiler: GNU Fortran Compiler
22
" Maintainer: H Xu <[email protected]>
33
" Version: 0.1.3
4-
" Last Change: 19 March 2011
4+
" Last Change: 2012 Apr 30
55
" Homepage: http://www.vim.org/scripts/script.php?script_id=3496
66
" https://bitbucket.org/xuhdev/compiler-gfortran.vim
77
" License: Same as Vim
@@ -10,6 +10,8 @@ if exists('current_compiler')
1010
finish
1111
endif
1212
let current_compiler = 'gfortran'
13+
let s:keepcpo= &cpo
14+
set cpo&vim
1315

1416
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
1517
command -nargs=* CompilerSet setlocal <args>
@@ -20,3 +22,6 @@ CompilerSet errorformat=
2022
\%-Z%trror:\ %m,
2123
\%-Z%tarning:\ %m,
2224
\%-C%.%#
25+
26+
let &cpo = s:keepcpo
27+
unlet s:keepcpo

runtime/compiler/gnat.vim

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
" Help Page: compiler-gnat
1818
"------------------------------------------------------------------------------
1919

20-
if (exists("current_compiler") &&
21-
\ current_compiler == "gnat") ||
22-
\ version < 700
20+
if (exists("current_compiler")&& current_compiler == "gnat") || version < 700
2321
finish
2422
endif
23+
let s:keepcpo= &cpo
24+
set cpo&vim
2525

2626
let current_compiler = "gnat"
2727

@@ -62,6 +62,9 @@ endif
6262
execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ')
6363
execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ')
6464

65+
let &cpo = s:keepcpo
66+
unlet s:keepcpo
67+
6568
finish " 1}}}
6669

6770
"------------------------------------------------------------------------------

runtime/compiler/hp_acc.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
" Compiler: HP aCC
33
" Maintainer: Matthias Ulrich <[email protected]>
44
" URL: http://www.subhome.de/vim/hp_acc.vim
5-
" Last Change: 2005 Nov 19
5+
" Last Change: 2012 Apr 30
66
"
77
" aCC --version says: "HP ANSI C++ B3910B A.03.13"
88
" This compiler has been tested on:
@@ -19,6 +19,8 @@ if exists("current_compiler")
1919
finish
2020
endif
2121
let current_compiler = "hp_acc"
22+
let s:keepcpo= &cpo
23+
set cpo&vim
2224

2325
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
2426
command -nargs=* CompilerSet setlocal <args>
@@ -30,4 +32,7 @@ CompilerSet errorformat=%A%trror\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m,
3032
\%Z\ \ \ \ %p^%.%#,
3133
\%-C%.%#
3234

35+
let &cpo = s:keepcpo
36+
unlet s:keepcpo
37+
3338
" vim:ts=8:sw=4:cindent

runtime/compiler/ifort.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Compiler: Intel Fortran Compiler
22
" Maintainer: H Xu <[email protected]>
33
" Version: 0.1.1
4-
" Last Change: 19 March 2011
4+
" Last Change: 2012 Apr 30
55
" Homepage: http://www.vim.org/scripts/script.php?script_id=3497
66
" https://bitbucket.org/xuhdev/compiler-ifort.vim
77
" License: Same as Vim
@@ -10,6 +10,8 @@ if exists('current_compiler')
1010
finish
1111
endif
1212
let current_compiler = 'ifort'
13+
let s:keepcpo= &cpo
14+
set cpo&vim
1315

1416
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
1517
command -nargs=* CompilerSet setlocal <args>
@@ -20,3 +22,6 @@ CompilerSet errorformat=
2022
\%A%f(%l):\ %tarning\ \#%n:\ %m,
2123
\%-Z%p^,
2224
\%-G%.%#
25+
26+
let &cpo = s:keepcpo
27+
unlet s:keepcpo

runtime/compiler/intel.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
" Vim compiler file
22
" Compiler: Intel C++ 7.1
33
" Maintainer: David Harrison <[email protected]>
4-
" Last Change: 2004 May 16
4+
" Last Change: 2012 Apr 30
55

66
if exists("current_compiler")
77
finish
88
endif
99
let current_compiler = "intel"
10+
let s:keepcpo= &cpo
11+
set cpo&vim
1012

1113
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
1214
command -nargs=* CompilerSet setlocal <args>
@@ -19,3 +21,6 @@ CompilerSet errorformat=%E%f(%l):\ error:\ %m,
1921
\%-Z\ \ %p^,
2022
\%-G\\s%#,
2123
\%-G%.%#
24+
25+
let &cpo = s:keepcpo
26+
unlet s:keepcpo

runtime/compiler/irix5_c.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
" Vim compiler file
22
" Compiler: SGI IRIX 5.3 cc
33
" Maintainer: David Harrison <[email protected]>
4-
" Last Change: 2004 Mar 27
4+
" Last Change: 2012 Apr 30
55

66
if exists("current_compiler")
77
finish
88
endif
99
let current_compiler = "irix5_c"
10+
let s:keepcpo= &cpo
11+
set cpo&vim
1012

1113
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
1214
command -nargs=* CompilerSet setlocal <args>
@@ -19,3 +21,6 @@ CompilerSet errorformat=\%Ecfe:\ Error:\ %f\\,\ line\ %l:\ %m,
1921
\%-Z\ %p^,
2022
\-G\\s%#,
2123
\%-G%.%#
24+
25+
let &cpo = s:keepcpo
26+
unlet s:keepcpo

0 commit comments

Comments
 (0)