From: Sam Williams Date: Tue, 28 Jul 2026 18:33:49 +0000 (+0000) Subject: runtime(m4): Prevent the m4Disabled region from nesting within itself. X-Git-Tag: v9.2.0868~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=70d55cd5162b03e5a058907b30bc96d544fc0594;p=thirdparty%2Fvim.git runtime(m4): Prevent the m4Disabled region from nesting within itself. closes: #20801 Signed-off-by: Sam Williams Signed-off-by: Christian Brabandt --- diff --git a/runtime/syntax/m4.vim b/runtime/syntax/m4.vim index c993e5864c..95bd0688be 100644 --- a/runtime/syntax/m4.vim +++ b/runtime/syntax/m4.vim @@ -46,7 +46,7 @@ syn cluster m4Top add=m4Quoted " they simply prevent any macros from being expanded, while the text remains " in the output. This region therefore disables any other matches. " – Comments themselves are disabled when quoted. -syn region m4Disabled start=+#+ end=+$+ containedin=ALLBUT,m4Quoted,m4ParamCount +syn region m4Disabled start=+#+ end=+$+ containedin=ALLBUT,m4Quoted,m4ParamCount,m4Disabled " Macros in M4: " – Name tokens consist of the longest possible sequence of letters, digits, diff --git a/runtime/syntax/testdir/dumps/m4_input_00.dump b/runtime/syntax/testdir/dumps/m4_input_00.dump new file mode 100644 index 0000000000..c8343eb9d8 --- /dev/null +++ b/runtime/syntax/testdir/dumps/m4_input_00.dump @@ -0,0 +1,20 @@ +>d+0#0000e05#ffffff0|n|l| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |d|e|f| |l|i|n|k| |m|4|D|i|s|a|b|l|e|d| |m|4|C|o|m@1|e|n|t| +0#0000000&@23 +@75 +|#+0#0000e05&@39| +0#0000000&@34 +|#+0#0000e05&@1| |<|s|u|m@1|a|r|y|>| +0#0000000&@62 +|#+0#0000e05&@1| @5|D|o|n|t|a|u|d|i|t| |s|e|a|r|c|h| |s@1|h| |h|o|m|e| |d|i|r|e|c|t|o|r|y| +0#0000000&@31 +|#+0#0000e05&@1| |<|/|s|u|m@1|a|r|y|>| +0#0000000&@61 +|#+0#0000e05&@1| |<|p|a|r|a|m| |n|a|m|e|=|"|d|o|m|a|i|n|"|>| +0#0000000&@50 +|#+0#0000e05&@1| @5|<|s|u|m@1|a|r|y|>| +0#0000000&@57 +|#+0#0000e05&@1| @5|D|o|m|a|i|n| |t|o| |n|o|t| |a|u|d|i|t|.| +0#0000000&@46 +|#+0#0000e05&@1| @5|<|/|s|u|m@1|a|r|y|>| +0#0000000&@56 +|#+0#0000e05&@1| |<|/|p|a|r|a|m|>| +0#0000000&@63 +|#+0#0000e05&| +0#0000000&@73 +|i|n|t|e|r|f|a|c|e|(|`+0#e000e06&|s+0#0000000&@1|h|_|d|o|n|t|a|u|d|i|t|_|s|e|a|r|c|h|_|u|s|e|r|_|h|o|m|e|_|d|i|r|'+0#e000e06&|,+0#0000000&|`+0#e000e06&| +0#0000000&@26 +@8|g|e|n|_|r|e|q|u|i|r|e|(+0#e000e06&|`| +0#0000000&@53 +@16|t|y|p|e| |s@1|h|_|h|o|m|e|_|t|;| @42 +@8|'+0#e000e06&|)| +0#0000000&@64 +@75 +@8|d|o|n|t|a|u|d|i|t| |$+0#e000e06&|1| +0#0000000&|s@1|h|_|h|o|m|e|_|t|:|d|i|r| |s|e|a|r|c|h|_|d|i|r|_|p|e|r|m|s|;| @21 +|'+0#e000e06&|)+0#0000000&| @72 +@57|1|,|1| @10|A|l@1| diff --git a/runtime/syntax/testdir/input/m4_input.m4 b/runtime/syntax/testdir/input/m4_input.m4 new file mode 100644 index 0000000000..332cfeeefc --- /dev/null +++ b/runtime/syntax/testdir/input/m4_input.m4 @@ -0,0 +1,19 @@ +dnl VIM_TEST_SETUP hi def link m4Disabled m4Comment + +######################################## +## +## Dontaudit search ssh home directory +## +## +## +## Domain to not audit. +## +## +# +interface(`ssh_dontaudit_search_user_home_dir',` + gen_require(` + type ssh_home_t; + ') + + dontaudit $1 ssh_home_t:dir search_dir_perms; +')