annotate runtime/ftplugin/cmake.vim @ 27464:a14c4d3e3260 v8.2.4260

patch 8.2.4260: Vim9: can still use a global function without g: Commit: https://github.com/vim/vim/commit/848faddb870f3ba4d84fcacd1cccb5cdbbfd9c41 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 30 15:28:30 2022 +0000 patch 8.2.4260: Vim9: can still use a global function without g: Problem: Vim9: can still use a global function without g: at the script level. Solution: Also check for g: at the script level. (issue #9637)
author Bram Moolenaar <Bram@vim.org>
date Sun, 30 Jan 2022 16:30:04 +0100
parents 34fd018452ed
children db548356f001
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13100
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Vim filetype plugin
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " Language: CMake
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " Maintainer: Keith Smiley <keithbsmiley@gmail.com>
14668
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
4 " Last Change: 2018 Aug 30
13100
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 " Only do this when not done yet for this buffer
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 if exists("b:did_ftplugin")
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 finish
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 endif
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10
14668
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
11 " save 'cpo' for restoration at the end of this file
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
12 let s:cpo_save = &cpo
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
13 set cpo&vim
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
14
13100
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 " Don't load another plugin for this buffer
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 let b:did_ftplugin = 1
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 let b:undo_ftplugin = "setl commentstring<"
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19
14668
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
20 if exists('loaded_matchit')
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
21 let b:match_words = '\<if\>:\<elseif\>\|\<else\>:\<endif\>'
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
22 \ . ',\<foreach\>\|\<while\>:\<break\>:\<endforeach\>\|\<endwhile\>'
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
23 \ . ',\<macro\>:\<endmacro\>'
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
24 \ . ',\<function\>:\<endfunction\>'
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
25 let b:match_ignorecase = 1
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
26
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
27 let b:undo_ftplugin .= "| unlet b:match_words"
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
28 endif
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
29
13100
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 setlocal commentstring=#\ %s
14668
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
31
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
32 " restore 'cpo' and clean up buffer variable
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
33 let &cpo = s:cpo_save
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
34 unlet s:cpo_save