Fix syntax highlighting of $ in Emacs

Magnus Henoch magnus@REDACTED
Wed Sep 22 17:01:34 CEST 2010


Dan Gudmundsson <dangud@REDACTED> writes:

> Hi
> I tested this, with test.erl included in the emacs directory.
>
> It looks much better, but after an Erlang/indent-buffer (from menu) it
> is broken,
> see color coding at line 213 and below.
>
> The original version doesn't behave that way, please fix.

Right, the regexp wasn't anchored anywhere, so after a reindent or other
suddent change the highlighter might believe that it's in the middle of
a string...

I pushed a new version, anchoring at the beginning of the line.  This
means that multi-line strings ending with a dollar sign will still be
broken, but no more broken than before, e.g.:

foo() ->
    "Multi-line string
ending with a $".

bar() ->
    this_gets_highlighted_as_a_string.

git fetch git://github.com/legoscia/otp.git dollar_font_lock

-- 
Magnus Henoch, magnus@REDACTED
  Erlang Solutions
  http://www.erlang-solutions.com/


More information about the erlang-patches mailing list