lunaryorn/puppet-mode — pull request #12 by lunaryorn (2013-08-19 18:15:52+00:00)
Title: The great font lock fixup

I dedicate this PR to fixing the font locking.

Currently, it just contains the relevant commit from puppetlabs/puppet-syntax-emacs#4 cherry-picked, to give us a basic start, but there is muuuuuuuuuch to do still.

I ignored puppetlabs/puppet-syntax-emacs#8, for it's the wrong fix imho. The culprit is not ordering, it's the lack of symbol boundaries in the keyword regexp.

Essentially each single regexp should be reviewed, ported to `rx`, using `symbol-start` and `symbol-end` at the right places, and as much `syntax` as possible.

The string regexp is probably superfluous, since we having syntactic fontification. However, we should highlight variable references in strings, just like Ruby does. Let's have a look at ruby-mode for this one.

Gonna start tomorrow evening, in the mean time, feel free to comment, @bbatsov.