On Sunday 16 January 2011, Ralf Wildenhues wrote: > * Stefano Lattarini wrote on Sun, Jan 16, 2011 at 04:55:43PM CET: > > I'm not sure if it is acceptable to submit a patch aimed at working > > around limits and warts of an editor's syntax highlighting, but I > > guess I'll find out very soon :-) > > It would be ok if it were a single instance or a ouple, and a > hard-to-fix bug in automake.vim; however, > git grep "##.*'" -- \*.am > > shows me 195 such instances, and > But only a few of them would give problems (but see below).
> vim lib/am/distdir.am > :set ft > > shows me the file type is detected as elf, not automake, > Oh no, that would have been too easy! I now see that, while I've tweaked my vim installation to recognize file types better, it still thinks distdir.am is ft=make, not ft=automake (d'oh!). Thus the highligthing was "almost" right, and the error was not as obvious as it would have been with ft=elf -- which caused me to miss it. Hmpf. > and > :setf automake > > fixes highlighting. > > > So, OK for maint, or only for /dev/null? > > The patch is not ok as it is. Preferably this should be fixed in > upstream $VIM/filetype.vim, and only if that is not possible, we can > consider adding Vim-specific modelines to our *.am files (so Vi is not > impacted). Are you familiar enough with vim scripting to suggest a > patch? Otherwise I can look at filetype.vim some time later. > No need to do so, it was just a user error on my part. Let's just drop the patch, and sorry for the noise. Regards, Stefano