annotate runtime/compiler/context.vim @ 30719:71137f73c94d v9.0.0694

patch 9.0.0694: no native sound support on Mac OS Commit: https://github.com/vim/vim/commit/4314e4f7da4db5d85f63cdf43b73be3689502c93 Author: Yee Cheng Chin <ychin.git@gmail.com> Date: Sat Oct 8 13:50:05 2022 +0100 patch 9.0.0694: no native sound support on Mac OS Problem: No native sound support on Mac OS. Solution: Add sound support for Mac OS. (Yee Cheng Chin, closes https://github.com/vim/vim/issues/11274)
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Oct 2022 15:00:05 +0200
parents 2acb87ee55fc
children d81556766132
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
1 vim9script
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
3 # Language: ConTeXt typesetting engine
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
4 # Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
5 # Former Maintainers: Nikolai Weibull <now@bitwi.se>
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
6 # Latest Revision: 2022 Aug 12
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
7
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
8 if exists("g:current_compiler")
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 finish
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 endif
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
12 import autoload '../autoload/context.vim'
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
13
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
14 if exists(":CompilerSet") != 2 # Older Vim always used :setlocal
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 command -nargs=* CompilerSet setlocal <args>
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 endif
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
18 g:current_compiler = 'context'
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
19
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 if get(b:, 'context_ignore_makefile', get(g:, 'context_ignore_makefile', 0)) ||
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
21 (!filereadable('Makefile') && !filereadable('makefile'))
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
22 &l:makeprg = join(context.ConTeXtCmd(shellescape(expand('%:p:t'))), ' ')
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 else
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
24 g:current_compiler = 'make'
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 endif
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
27 const context_errorformat = join([
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
28 "%-Popen source%.%#> %f",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
29 "%-Qclose source%.%#> %f",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
30 "%-Popen source%.%#name '%f'",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
31 "%-Qclose source%.%#name '%f'",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
32 "tex %trror%.%#error on line %l in file %f: %m",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
33 "%Elua %trror%.%#error on line %l in file %f:",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
34 "%+Emetapost %#> error: %#",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
35 "%Emetafun%.%#error: %m",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
36 "! error: %#%m",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
37 "%-C %#",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
38 "%C! %m",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
39 "%Z[ctxlua]%m",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
40 "%+C<*> %.%#",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
41 "%-C%.%#",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
42 "%Z...%m",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
43 "%-Zno-error",
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
44 "%-G%.%#"], ",")
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
46 execute 'CompilerSet errorformat=' .. escape(context_errorformat, ' ')
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
48 # vim: sw=2 fdm=marker