summaryrefslogtreecommitdiff
path: root/Auxiliary/vim/extract-upper-case.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Auxiliary/vim/extract-upper-case.pl')
-rwxr-xr-xAuxiliary/vim/extract-upper-case.pl25
1 files changed, 16 insertions, 9 deletions
diff --git a/Auxiliary/vim/extract-upper-case.pl b/Auxiliary/vim/extract-upper-case.pl
index 6dbb678ac7..bd62aded9e 100755
--- a/Auxiliary/vim/extract-upper-case.pl
+++ b/Auxiliary/vim/extract-upper-case.pl
@@ -103,25 +103,25 @@ while(<IN>)
my @tmp = grep { ! exists $conditional{$_} and
! exists $loop{$_} and
! exists $deprecated{$_} } @commands;
- print OUT " " x 12 , "\\ ", join(" ", @tmp), "\n";
+ print_list(\*OUT, @tmp);
} elsif ($1 eq "VARIABLE_LIST") {
- print OUT " " x 12 , "\\ ", join(" ", sort keys %variables), "\n";
+ print_list(\*OUT, keys %variables);
} elsif ($1 eq "MODULES") {
- print OUT " " x 12 , "\\ ", join("\n", @modules), "\n";
+ print_list(\*OUT, @modules);
} elsif ($1 eq "GENERATOR_EXPRESSIONS") {
- print OUT " " x 12 , "\\ ", join(" ", @generator_expr), "\n";
+ print_list(\*OUT, @generator_expr);
} elsif ($1 eq "CONDITIONALS") {
- print OUT " " x 12 , "\\ ", join(" ", sort keys %conditional), "\n";
+ print_list(\*OUT, keys %conditional);
} elsif ($1 eq "LOOPS") {
- print OUT " " x 12 , "\\ ", join(" ", sort keys %loop), "\n";
+ print_list(\*OUT, keys %loop);
} elsif ($1 eq "DEPRECATED") {
- print OUT " " x 12 , "\\ ", join(" ", sort keys %deprecated), "\n";
+ print_list(\*OUT, keys %deprecated);
} elsif ($1 eq "PROPERTIES") {
- print OUT " " x 12 , "\\ ", join(" ", sort keys %properties), "\n";
+ print_list(\*OUT, keys %properties);
} elsif ($1 eq "KEYWORDS") {
foreach my $k (sort keys %keywords) {
print OUT "syn keyword cmakeKW$k contained\n";
- print OUT " " x 12, "\\ ", join(" ", @{$keywords{$k}}), "\n";
+ print_list(\*OUT, @{$keywords{$k}});
print OUT "\n";
push @keyword_hi, "hi def link cmakeKW$k ModeMsg";
}
@@ -164,3 +164,10 @@ sub extract_upper
return @word;
}
+
+sub print_list
+{
+ my $O = shift;
+ my $indent = " " x 12 . "\\ ";
+ print $O $indent, join("\n" . $indent, sort @_), "\n";
+}