Mercurial > vim
annotate runtime/ftplugin/freebasic.vim @ 34342:dd5023389a98 v9.1.0104
patch 9.1.0104: Linking fails with -lto because of PERL_CFLAGS
Commit: https://github.com/vim/vim/commit/2f9aef42af94f6d68f37f6e9b8cb878e88ed12bf
Author: Christian Brabandt <cb@256bit.org>
Date: Mon Feb 12 23:12:26 2024 +0100
patch 9.1.0104: Linking fails with -lto because of PERL_CFLAGS
Problem: Linking fails with -lto because of PERL_CFLAGS
(Zoltan Toth)
Solution: Filter out -flto argument from Perl CFLAGS.
fixes: #14012
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 12 Feb 2024 23:30:03 +0100 |
parents | 8ae680be2a51 |
children |
rev | line source |
---|---|
23737 | 1 " Vim filetype plugin file |
27459 | 2 " Language: FreeBASIC |
23737 | 3 " Maintainer: Doug Kearns <dougkearns@gmail.com> |
34134
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
29352
diff
changeset
|
4 " Last Change: 2023 Aug 22 |
23737 | 5 |
27459 | 6 " Setup {{{1 |
23737 | 7 if exists("b:did_ftplugin") |
8 finish | |
9 endif | |
27459 | 10 |
11 let s:cpo_save = &cpo | |
12 set cpo&vim | |
23737 | 13 |
14 runtime! ftplugin/basic.vim | |
15 | |
27459 | 16 let s:dialect = freebasic#GetDialect() |
17 | |
18 " Comments {{{1 | |
19 " add ''comments before 'comments | |
20 let &l:comments = "sO:*\ -,mO:*\ \ ,exO:*/,s1:/',mb:',ex:'/,:''," .. &l:comments | |
21 | |
22 " Match words {{{1 | |
23 if exists("loaded_matchit") | |
29352 | 24 let s:line_start = '\%(^\s*\)\@<=' |
25 let s:not_end = '\%(end\s\+\)\@<!' | |
27459 | 26 |
27 let b:match_words ..= ',' | |
28 | |
29 if s:dialect == 'fb' | |
30 let b:match_words ..= s:not_end .. '\<constructor\>:\<end\s\+constructor\>,' .. | |
31 \ s:not_end .. '\<destructor\>:\<end\s\+destructor\>,' .. | |
32 \ s:not_end .. '\<property\>:\<end\s\+property\>,' .. | |
33 \ s:not_end .. '\<operator\>:\<end\s\+operator\>,' .. | |
34 \ s:not_end .. '\<extern\%(\s\+"\)\@=:\<end\s\+extern\>,' | |
35 endif | |
36 | |
37 if s:dialect == 'fb' || s:dialect == 'deprecated' | |
38 let b:match_words ..= s:not_end .. '\<scope\>:\<end\s\+scope\>,' | |
39 endif | |
40 | |
41 if s:dialect == 'qb' | |
42 let b:match_words ..= s:not_end .. '\<__asm\>:\<end\s\+__asm\>,' .. | |
43 \ s:not_end .. '\<__union\>:\<end\s\+__union\>,' .. | |
44 \ s:not_end .. '\<__with\>:\<end\s\+__with\>,' | |
45 else | |
46 let b:match_words ..= s:not_end .. '\<asm\>:\<end\s\+asm\>,' .. | |
47 \ s:not_end .. '\<namespace\>:\<end\s\+namespace\>,' .. | |
48 \ s:not_end .. '\<union\>:\<end\s\+union\>,' .. | |
49 \ s:not_end .. '\<with\>:\<end\s\+with\>,' | |
50 endif | |
51 | |
52 let b:match_words ..= s:not_end .. '\<enum\>:\<end\s\+enum\>,' .. | |
29352 | 53 \ s:line_start .. '#\s*\%(if\|ifdef\|ifndef\)\>:' .. |
54 \ s:line_start .. '#\s*\%(else\|elseif\)\>:' .. | |
55 \ s:line_start .. '#\s*endif\>,' .. | |
56 \ s:line_start .. '#\s*macro\>:' .. s:line_start .. '#\s*endmacro\>,' .. | |
57 \ "/':'/" | |
27459 | 58 |
29352 | 59 " skip "function = <retval>" and "continue { do | for | while }" |
60 if s:dialect == "qb" | |
61 let s:continue = "__continue" | |
62 else | |
63 let s:continue = "continue" | |
64 endif | |
65 let b:match_skip ..= ' || strpart(getline("."), col(".") - 1) =~? "^\\<function\\s\\+="' .. | |
66 \ ' || strpart(getline("."), 0, col(".") ) =~? "\\<' .. s:continue .. '\\s\\+"' | |
27459 | 67 |
29352 | 68 unlet s:not_end s:line_start |
69 endif | |
70 | |
71 if (has("gui_win32") || has("gui_gtk")) && exists("b:basic_set_browsefilter") | |
72 let b:browsefilter = "FreeBASIC Source Files (*.bas)\t*.bas\n" .. | |
34134
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
29352
diff
changeset
|
73 \ "FreeBASIC Header Files (*.bi)\t*.bi\n" |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
29352
diff
changeset
|
74 if has("win32") |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
29352
diff
changeset
|
75 let b:browsefilter ..= "All Files (*.*)\t*\n" |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
29352
diff
changeset
|
76 else |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
29352
diff
changeset
|
77 let b:browsefilter ..= "All Files (*)\t*\n" |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
29352
diff
changeset
|
78 endif |
27459 | 79 endif |
80 | |
81 " Cleanup {{{1 | |
82 let &cpo = s:cpo_save | |
29352 | 83 unlet s:cpo_save s:dialect |
27459 | 84 |
85 " vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker: |