petdance/vim-perl — pull request #80 by benizi (2012-05-28 16:58:19+00:00)
Title: Fix perlElseIfError when used in other syntax type

When used in the Mason syntax type, the way the perlElseIfError group
was handled caused any line beginning with 'if' to be highlighted as an
error. This is due to the way Vim includes other syntax files.
perlElseIfError was marked as 'contained', but wasn't limited to a
specific group. When perl.vim gets included, perlElseIfError is then
allowed to exist at what was formerly the top level.

Instead, make the errant '\s*if' of 'elseif' and 'else if' a part of the
perlConditional group, so that perlElseIfError can be confined to
containedin=perlConditional.

In Perl files, everything that should be marked as a perlElseIfError is
handled properly. In Mason files, this prevents the erroneous
perlElseIfError highlighting for 'if', but only marks 'elseif' as an
error (the :syn-keyword perlElseIfError works; the :syn-match doesn't).