Skip to content

Commit 5f7e2bb

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents f9ccb28 + d657d3d commit 5f7e2bb

33 files changed

+684
-311
lines changed

.github/MAINTAINERS

+2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ runtime/compiler/gawk.vim @dkearns
6565
runtime/compiler/gjs.vim @dkearns
6666
runtime/compiler/gm2.vim @dkearns
6767
runtime/compiler/go.vim @dbarnett
68+
runtime/compiler/groff.vim @Konfekt
6869
runtime/compiler/haml.vim @tpope
6970
runtime/compiler/hare.vim @selenebun
7071
runtime/compiler/icon.vim @dkearns
@@ -75,6 +76,7 @@ runtime/compiler/jshint.vim @dkearns
7576
runtime/compiler/jsonlint.vim @dkearns
7677
runtime/compiler/jq.vim @vito-c
7778
runtime/compiler/lazbuild.vim @dkearns
79+
runtime/compiler/pandoc.vim @Konfekt
7880
runtime/compiler/perl.vim @petdance @heptite
7981
runtime/compiler/perlcritic.vim @petdance @dkearns
8082
runtime/compiler/php.vim @dkearns

runtime/compiler/README.txt

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ They are used with the ":compiler" command.
44
These scripts usually set options, for example 'errorformat'.
55
See ":help write-compiler-plugin".
66

7+
To undo the effect of a compiler plugin, use the make compiler plugin.
8+
79
If you want to write your own compiler plugin, have a look at the other files
810
for how to do it, the format is simple.
911

runtime/compiler/groff.vim

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
" Vim compiler file
2+
" Compiler: Groff
3+
" Maintainer: Konfekt
4+
" Last Change: 2024 Sep 8
5+
"
6+
" Expects output file extension, say `:make html` or `:make pdf`.
7+
" Supported devices as of Sept 2024 are: (x)html, pdf, ps, dvi, lj4, lbp ...
8+
" Adjust command-line flags, language, encoding by buffer-local/global variables
9+
" groff_compiler_args, groff_compiler_lang, and groff_compiler_encoding,
10+
" which default to '', &spelllang and 'utf8'.
11+
12+
if exists("current_compiler")
13+
finish
14+
endif
15+
16+
let s:keepcpo = &cpo
17+
set cpo&vim
18+
19+
let current_compiler = 'groff'
20+
21+
silent! function s:groff_compiler_lang()
22+
let lang = get(b:, 'groff_compiler_lang',
23+
\ &spell ? matchstr(&spelllang, '^\a\a') : '')
24+
if lang ==# 'en' | let lang = '' | endif
25+
return empty(lang) ? '' : '-m'..lang
26+
endfunction
27+
28+
" Requires output format (= device) to be set by user after :make.
29+
execute 'CompilerSet makeprg=groff'..escape(
30+
\ ' '..s:groff_compiler_lang()..
31+
\ ' -K'..get(b:, 'groff_compiler_encoding', get(g:, 'groff_compiler_encoding', 'utf8'))..
32+
\ ' '..get(b:, 'groff_compiler_args', get(g:, 'groff_compiler_args', ''))..
33+
\ ' -mom -T$* -- %:S > %:r:S.$*', ' ')
34+
" From Gavin Freeborn's https://github.com/Gavinok/vim-troff under Vim License
35+
" https://github.com/Gavinok/vim-troff/blob/91017b1423caa80aba541c997909a4f810edd275/compiler/troff.vim#L39
36+
CompilerSet errorformat=%o:<standard\ input>\ (%f):%l:%m,
37+
\%o:\ <standard\ input>\ (%f):%l:%m,
38+
\%o:%f:%l:%m,
39+
\%o:\ %f:%l:%m,
40+
\%f:%l:\ macro\ %trror:%m,
41+
\%f:%l:%m,
42+
\%W%tarning:\ file\ '%f'\\,\ around\ line\ %l:,%Z%m
43+
44+
let &cpo = s:keepcpo
45+
unlet s:keepcpo

runtime/compiler/make.vim

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
" Vim compiler plugin
2+
"
3+
" Maintainer: The Vim Project <https://github.com/vim/vim>
4+
" Last Change: 2024 Sep 10
5+
" Original Author: Konfekt
6+
"
7+
" This compiler plugin is used to reset previously set compiler options.
8+
9+
if exists("g:current_compiler") | unlet g:current_compiler | endif
10+
if exists("b:current_compiler") | unlet b:current_compiler | endif
11+
12+
CompilerSet makeprg&
13+
CompilerSet errorformat&

runtime/compiler/pandoc.vim

+16-11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
" Vim compiler file
22
" Compiler: Pandoc
33
" Maintainer: Konfekt
4-
" Last Change: 2024 Aug 20
4+
" Last Change: 2024 Sep 8
55
"
66
" Expects output file extension, say `:make html` or `:make pdf`.
77
" Passes additional arguments to pandoc, say `:make html --self-contained`.
8+
" Adjust command-line flags by buffer-local/global variable
9+
" b/g:pandoc_compiler_args which defaults to empty.
810

911
if exists("current_compiler")
1012
finish
@@ -40,18 +42,21 @@ silent! function s:PandocFiletype(filetype) abort
4042
endif
4143
endfunction
4244

43-
let b:pandoc_compiler_from = get(b:, 'pandoc_compiler_from', s:PandocFiletype(&filetype))
44-
let b:pandoc_compiler_lang = get(b:, 'pandoc_compiler_lang', &spell ? matchstr(&spelllang, '^\a\a') : '')
45+
silent! function s:PandocLang()
46+
let lang = get(b:, 'pandoc_compiler_lang',
47+
\ &spell ? matchstr(&spelllang, '^\a\a') : '')
48+
if lang ==# 'en' | let lang = '' | endif
49+
return empty(lang) ? '' : '--metadata lang='..lang
50+
endfunction
4551

4652
execute 'CompilerSet makeprg=pandoc'..escape(
47-
\ ' --standalone' .
48-
\ (b:pandoc_compiler_from ==# 'markdown' && (getline(1) =~# '^%\s\+\S\+' || (search('^title:\s+\S+', 'cnw') > 0)) ?
49-
\ '' : ' --metadata title=%:t:r:S') .
50-
\ (empty(b:pandoc_compiler_lang) ?
51-
\ '' : ' --metadata lang='..b:pandoc_compiler_lang) .
52-
\ ' --from='..b:pandoc_compiler_from .
53-
\ ' '..get(b:, 'pandoc_compiler_args', get(g:, 'pandoc_compiler_args', '')) .
54-
\ ' --output %:r:S.$* -- %:S', ' ')
53+
\ ' --standalone'..
54+
\ (s:PandocFiletype(&filetype) ==# 'markdown' && (getline(1) =~# '^%\s\+\S\+' || (search('^title:\s+\S+', 'cnw') > 0)) ?
55+
\ '' : ' --metadata title=%:t:r:S')..
56+
\ ' '..s:PandocLang()..
57+
\ ' --from='..s:PandocFiletype(&filetype)..
58+
\ ' '..get(b:, 'pandoc_compiler_args', get(g:, 'pandoc_compiler_args', ''))..
59+
\ ' --output %:r:S.$* -- %:S', ' ')
5560
CompilerSet errorformat=\"%f\",\ line\ %l:\ %m
5661

5762
let &cpo = s:keepcpo

runtime/doc/builtin.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.1. Last change: 2024 Aug 08
1+
*builtin.txt* For Vim version 9.1. Last change: 2024 Sep 10
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -8965,6 +8965,9 @@ search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])
89658965
{timeout} is 500 the search stops after half a second.
89668966
The value must not be negative. A zero value is like not
89678967
giving the argument.
8968+
8969+
Note: the timeout is only considered when searching, not
8970+
while evaluating the {skip} expression.
89688971
{only available when compiled with the |+reltime| feature}
89698972

89708973
If the {skip} expression is given it is evaluated with the

runtime/doc/options.txt

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 9.1. Last change: 2024 Sep 07
1+
*options.txt* For Vim version 9.1. Last change: 2024 Sep 10
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2163,10 +2163,7 @@ A jump table for the options with a short description can be found at |Q_op|.
21632163
fuzzy Enable |fuzzy-matching| for completion candidates. This
21642164
allows for more flexible and intuitive matching, where
21652165
characters can be skipped and matches can be found even
2166-
if the exact sequence is not typed. Only makes a
2167-
difference how completion candidates are reduced from the
2168-
list of alternatives, but not how the candidates are
2169-
collected (using different completion types).
2166+
if the exact sequence is not typed.
21702167

21712168
*'completepopup'* *'cpp'*
21722169
'completepopup' 'cpp' string (default empty)

runtime/doc/quickfix.txt

+21-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*quickfix.txt* For Vim version 9.1. Last change: 2024 Aug 20
1+
*quickfix.txt* For Vim version 9.1. Last change: 2024 Sep 10
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1276,6 +1276,7 @@ not "b:current_compiler". What the command actually does is the following:
12761276

12771277
For writing a compiler plugin, see |write-compiler-plugin|.
12781278

1279+
Use the |compiler-make| plugin to undo the effect of a compiler plugin.
12791280

12801281
DOTNET *compiler-dotnet*
12811282

@@ -1291,7 +1292,6 @@ Example: limit output to only display errors, and suppress the project name: >
12911292
let dotnet_show_project_file = v:false
12921293
compiler dotnet
12931294
<
1294-
12951295
GCC *quickfix-gcc* *compiler-gcc*
12961296

12971297
There's one variable you can set for the GCC compiler:
@@ -1302,14 +1302,19 @@ g:compiler_gcc_ignore_unmatched_lines
13021302
commands run from make are generating false
13031303
positives.
13041304

1305-
13061305
JAVAC *compiler-javac*
13071306

13081307
Commonly used compiler options can be added to 'makeprg' by setting the
13091308
g:javac_makeprg_params variable. For example: >
13101309
13111310
let g:javac_makeprg_params = "-Xlint:all -encoding utf-8"
13121311
<
1312+
GNU MAKE *compiler-make*
1313+
1314+
Since the default make program is "make", the compiler plugin for make,
1315+
:compiler make, will reset the 'makeprg' and 'errorformat' option to
1316+
the default values and unlet any variables that may have been set by a
1317+
previous compiler plugin.
13131318

13141319
MANX AZTEC C *quickfix-manx* *compiler-manx*
13151320

@@ -1335,6 +1340,18 @@ If Vim was started from the compiler, the :sh and some :! commands will not
13351340
work, because Vim is then running in the same process as the compiler and
13361341
stdin (standard input) will not be interactive.
13371342

1343+
GROFF *quickfix-groff* *compiler-groff*
1344+
1345+
The GROFF compiler plugin uses the mom macro set (documented in the groff_mom
1346+
manpage) as input and expects that the output file type extension is passed to
1347+
make, say :make html or :make pdf.
1348+
1349+
Additional arguments can be passed to groff by setting them in
1350+
`b:groff_compiler_args` or `g:groff_compiler_args`. The `language` argument
1351+
passed to groff is set using 'spelllang'; it can be overridden by setting
1352+
`b:groff_compiler_lang`. The default enconding is `UTF-8` and can be changed
1353+
by setting `b:groff_compiler_encoding` or `g:groff_compiler_encoding`.
1354+
13381355
PANDOC *quickfix-pandoc* *compiler-pandoc*
13391356

13401357
The Pandoc compiler plugin expects that an output file type extension is
@@ -1347,8 +1364,7 @@ Additional arguments can be passed to pandoc:
13471364

13481365
The `--from` argument is an educated guess using the buffer file type;
13491366
it can be overridden by setting `b:pandoc_compiler_from`.
1350-
Likewise the `--metadata lang` argument is set using `&spelllang`;
1351-
it can be overridden by setting `b:pandoc_compiler_lang`.
1367+
The `--metadata lang` argument is set using 'spelllang';
13521368
If `--from=markdown` is assumed and no title set in a title header or
13531369
YAML block, then the filename (without extension) is used as the title.
13541370

runtime/doc/tags

+3
Original file line numberDiff line numberDiff line change
@@ -6644,8 +6644,10 @@ compiler-decada ft_ada.txt /*compiler-decada*
66446644
compiler-dotnet quickfix.txt /*compiler-dotnet*
66456645
compiler-gcc quickfix.txt /*compiler-gcc*
66466646
compiler-gnat ft_ada.txt /*compiler-gnat*
6647+
compiler-groff quickfix.txt /*compiler-groff*
66476648
compiler-hpada ft_ada.txt /*compiler-hpada*
66486649
compiler-javac quickfix.txt /*compiler-javac*
6650+
compiler-make quickfix.txt /*compiler-make*
66496651
compiler-manx quickfix.txt /*compiler-manx*
66506652
compiler-pandoc quickfix.txt /*compiler-pandoc*
66516653
compiler-perl quickfix.txt /*compiler-perl*
@@ -9806,6 +9808,7 @@ quickfix-directory-stack quickfix.txt /*quickfix-directory-stack*
98069808
quickfix-error-lists quickfix.txt /*quickfix-error-lists*
98079809
quickfix-functions usr_41.txt /*quickfix-functions*
98089810
quickfix-gcc quickfix.txt /*quickfix-gcc*
9811+
quickfix-groff quickfix.txt /*quickfix-groff*
98099812
quickfix-index quickfix.txt /*quickfix-index*
98109813
quickfix-manx quickfix.txt /*quickfix-manx*
98119814
quickfix-pandoc quickfix.txt /*quickfix-pandoc*

runtime/filetype.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -2371,7 +2371,7 @@ au BufNewFile,BufRead *.sml setf sml
23712371
au BufNewFile,BufRead *.cm setf voscm
23722372

23732373
" Swift
2374-
au BufNewFile,BufRead *.swift setf swift
2374+
au BufNewFile,BufRead *.swift,*.swiftinterface setf swift
23752375
au BufNewFile,BufRead *.swift.gyb setf swiftgyb
23762376

23772377
" Swift Intermediate Language or SILE

runtime/ftplugin/spec.vim

+12-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
" Filename: spec.vim
33
" Maintainer: Igor Gnatenko [email protected]
44
" Former Maintainer: Gustavo Niemeyer <[email protected]> (until March 2014)
5-
" Last Change: Mon Jun 01 21:15 MSK 2015 Igor Gnatenko
6-
" Update by Zdenek Dohnal, 2022 May 17
5+
" Last Change: 2015 Jun 01
6+
" Update by Zdenek Dohnal, 2022 May 17
7+
" 2024 Sep 10 by Vim Project: add epoch support for spec changelog, #15537
78

89
if exists("b:did_ftplugin")
910
finish
@@ -66,9 +67,11 @@ if !exists("*s:SpecChangelog")
6667
endif
6768
let line = 0
6869
let name = ""
70+
let epoch = ""
6971
let ver = ""
7072
let rel = ""
7173
let nameline = -1
74+
let epochline = -1
7275
let verline = -1
7376
let relline = -1
7477
let chgline = -1
@@ -77,6 +80,9 @@ if !exists("*s:SpecChangelog")
7780
if name == "" && linestr =~? '^Name:'
7881
let nameline = line
7982
let name = substitute(strpart(linestr,5), '^[ ]*\([^ ]\+\)[ ]*$','\1','')
83+
elseif epoch == "" && linestr =~? '^Epoch:'
84+
let epochline = line
85+
let epoch = substitute(strpart(linestr,6), '^[ ]*\([^ ]\+\)[ ]*$','\1','')
8086
elseif ver == "" && linestr =~? '^Version:'
8187
let verline = line
8288
let ver = substitute(strpart(linestr,8), '^[ ]*\([^ ]\+\)[ ]*$','\1','')
@@ -93,6 +99,7 @@ if !exists("*s:SpecChangelog")
9399
if nameline != -1 && verline != -1 && relline != -1
94100
let include_release_info = exists("g:spec_chglog_release_info")
95101
let name = s:ParseRpmVars(name, nameline)
102+
let epoch = s:ParseRpmVars(epoch, epochline)
96103
let ver = s:ParseRpmVars(ver, verline)
97104
let rel = s:ParseRpmVars(rel, relline)
98105
else
@@ -117,6 +124,9 @@ if !exists("*s:SpecChangelog")
117124
if chgline != -1
118125
let tmptime = v:lc_time
119126
language time C
127+
if strlen(epoch)
128+
let ver = epoch.":".ver
129+
endif
120130
let parsed_format = "* ".strftime(format)." - ".ver."-".rel
121131
execute "language time" tmptime
122132
let release_info = "+ ".name."-".ver."-".rel

runtime/syntax/dosini.vim

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
" Vim syntax file
22
" Language: Configuration File (ini file) for MSDOS/MS Windows
3-
" Version: 2.3
3+
" Version: 2.4
44
" Original Author: Sean M. McKee <[email protected]>
55
" Previous Maintainer: Nima Talebi <[email protected]>
66
" Current Maintainer: Hong Xu <[email protected]>
77
" Homepage: http://www.vim.org/scripts/script.php?script_id=3747
88
" Repository: https://github.com/xuhdev/syntax-dosini.vim
9-
" Last Change: 2023 Aug 20
9+
" Last Change: 2024 Sept 08
1010

1111

1212
" quit when a syntax file was already loaded
@@ -27,7 +27,7 @@ syn match dosiniNumber "=\zs\s*\d\+\s*$"
2727
syn match dosiniNumber "=\zs\s*\d*\.\d\+\s*$"
2828
syn match dosiniNumber "=\zs\s*\d\+e[+-]\=\d\+\s*$"
2929
syn region dosiniHeader start="^\s*\[" end="\]"
30-
syn match dosiniComment "^[#;].*$"
30+
syn match dosiniComment "^[#;].*$" contains=@Spell
3131
syn region dosiniSection start="\s*\[.*\]" end="\ze\s*\[.*\]" fold
3232
\ contains=dosiniLabel,dosiniValue,dosiniNumber,dosiniHeader,dosiniComment
3333

runtime/syntax/idlang.vim

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
" Interactive Data Language syntax file (IDL, too [:-)]
22
" Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com>
3-
" Last change: 2011 Apr 11
4-
" Created by: Hermann Rochholz <Hermann.Rochholz AT gmx.de>
3+
" Created By: Hermann Rochholz <Hermann.Rochholz AT gmx.de>
4+
" Last Change: 2011 Apr 11
5+
" 2024 Sep 10 by Vim Project: update syntax script, #15419
56

67
" Remove any old syntax stuff hanging around
78
" quit when a syntax file was already loaded
@@ -16,7 +17,7 @@ syn match idlangStatement "^\s*function\s"
1617
syn keyword idlangStatement return continue mod do break
1718
syn keyword idlangStatement compile_opt forward_function goto
1819
syn keyword idlangStatement begin common end of
19-
syn keyword idlangStatement inherits on_ioerror begin
20+
syn keyword idlangStatement inherits on_error on_ioerror begin
2021

2122
syn keyword idlangConditional if else then for while case switch
2223
syn keyword idlangConditional endcase endelse endfor endswitch
@@ -82,7 +83,7 @@ syn keyword idlangRoutine CALL_EXTERNAL CALL_FUNCTION CALL_METHOD
8283
syn keyword idlangRoutine CALL_PROCEDURE CATCH CD CEIL CHEBYSHEV CHECK_MATH
8384
syn keyword idlangRoutine CHISQR_CVF CHISQR_PDF CHOLDC CHOLSOL CINDGEN
8485
syn keyword idlangRoutine CIR_3PNT CLOSE CLUST_WTS CLUSTER COLOR_CONVERT
85-
syn keyword idlangRoutine COLOR_QUAN COLORMAP_APPLICABLE COMFIT COMMON
86+
syn keyword idlangRoutine COLOR_QUAN COLORMAP_APPLICABLE COMFIT
8687
syn keyword idlangRoutine COMPLEX COMPLEXARR COMPLEXROUND
8788
syn keyword idlangRoutine COMPUTE_MESH_NORMALS COND CONGRID CONJ
8889
syn keyword idlangRoutine CONSTRAINED_MIN CONTOUR CONVERT_COORD CONVOL
@@ -98,7 +99,7 @@ syn keyword idlangRoutine CW_PALETTE_EDITOR_GET CW_PALETTE_EDITOR_SET
9899
syn keyword idlangRoutine CW_PDMENU CW_RGBSLIDER CW_TMPL CW_ZOOM DBLARR
99100
syn keyword idlangRoutine DCINDGEN DCOMPLEX DCOMPLEXARR DEFINE_KEY DEFROI
100101
syn keyword idlangRoutine DEFSYSV DELETE_SYMBOL DELLOG DELVAR DERIV DERIVSIG
101-
syn keyword idlangRoutine DETERM DEVICE DFPMIN DIALOG_MESSAGE
102+
syn keyword idlangRoutine DETERM DEVICE DFPMIN DIAG_MATRIX DIALOG_MESSAGE
102103
syn keyword idlangRoutine DIALOG_PICKFILE DIALOG_PRINTERSETUP
103104
syn keyword idlangRoutine DIALOG_PRINTJOB DIALOG_READ_IMAGE
104105
syn keyword idlangRoutine DIALOG_WRITE_IMAGE DIGITAL_FILTER DILATE DINDGEN
@@ -155,7 +156,7 @@ syn keyword idlangRoutine MPEG_PUT MPEG_SAVE MSG_CAT_CLOSE MSG_CAT_COMPILE
155156
syn keyword idlangRoutine MSG_CAT_OPEN MULTI N_ELEMENTS N_PARAMS N_TAGS
156157
syn keyword idlangRoutine NEWTON NORM OBJ_CLASS OBJ_DESTROY OBJ_ISA OBJ_NEW
157158
syn keyword idlangRoutine OBJ_VALID OBJARR ON_ERROR ON_IOERROR ONLINE_HELP
158-
syn keyword idlangRoutine OPEN OPENR OPENW OPLOT OPLOTERR P_CORRELATE
159+
syn keyword idlangRoutine OPEN OPENR OPENW OPENU OPLOT OPLOTERR P_CORRELATE
159160
syn keyword idlangRoutine PARTICLE_TRACE PCOMP PLOT PLOT_3DBOX PLOT_FIELD
160161
syn keyword idlangRoutine PLOTERR PLOTS PNT_LINE POINT_LUN POLAR_CONTOUR
161162
syn keyword idlangRoutine POLAR_SURFACE POLY POLY_2D POLY_AREA POLY_FIT

0 commit comments

Comments
 (0)