annotate runtime/compiler/perl.vim @ 24760:ca0f983f08cf v8.2.2918

patch 8.2.2918: builtin function can be shadowed by global variable Commit: https://github.com/vim/vim/commit/3d9c4eefe656ee8bf58c0496a48bd56bac180056 Author: Bram Moolenaar <Bram@vim.org> Date: Mon May 31 22:15:26 2021 +0200 patch 8.2.2918: builtin function can be shadowed by global variable Problem: Builtin function can be shadowed by global variable. Solution: Check for builtin function before variable. (Yasuhiro Matsumoto, closes #8302)
author Bram Moolenaar <Bram@vim.org>
date Mon, 31 May 2021 22:30:02 +0200
parents 2704c4e3e20a
children d1fe80fb35e6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim Compiler File
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Compiler: Perl syntax checks (perl -Wc)
2239
732cb7b31956 Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents: 1622
diff changeset
3 " Maintainer: Christian J. Robinson <heptite@gmail.com>
17571
2704c4e3e20a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2239
diff changeset
4 " Last Change: 2019 Jul 22
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 if exists("current_compiler")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 let current_compiler = "perl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 if exists(":CompilerSet") != 2 " older Vim always used :setlocal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 command -nargs=* CompilerSet setlocal <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 let s:savecpo = &cpo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 set cpo&vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
1622
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
18 if exists('g:perl_compiler_force_warnings') && g:perl_compiler_force_warnings == 0
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
19 let s:warnopt = 'w'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 else
1622
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
21 let s:warnopt = 'W'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
1622
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
24 if getline(1) =~# '-[^ ]*T'
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
25 let s:taintopt = 'T'
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
26 else
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
27 let s:taintopt = ''
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
28 endif
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
29
17571
2704c4e3e20a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2239
diff changeset
30 exe 'CompilerSet makeprg=perl\ -' . s:warnopt . s:taintopt . 'c\ %:S'
1622
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
31
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 CompilerSet errorformat=
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 \%-G%.%#had\ compilation\ errors.,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 \%-G%.%#syntax\ OK,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 \%m\ at\ %f\ line\ %l.,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 \%+A%.%#\ at\ %f\ line\ %l\\,%.%#,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 \%+C%.%#
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Explanation:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " %-G%.%#had\ compilation\ errors., - Ignore the obvious.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " %-G%.%#syntax\ OK, - Don't include the 'a-okay' message.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " %m\ at\ %f\ line\ %l., - Most errors...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " %+A%.%#\ at\ %f\ line\ %l\\,%.%#, - As above, including ', near ...'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " %+C%.%# - ... Which can be multi-line.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 let &cpo = s:savecpo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 unlet s:savecpo