Hi!<br><br>Currently font-lock fontification in erlang-mode fails for the first erlang variable in the fontification region if the region to fontify starts on the same position as the variable. This is because the current regexp requires at least one character (any character except #) to be present before the actual variable names starts. This patch tweaks the regexp slightly to allow either a start-of-word or a non-# at the head of the variable-name.<br>
<br>The use case is that I'm trying to accomplish syntax highlighting in the erlang-shell inside Emacs and the problem I encountered was that in the following example only Bar would be highlighted as a variable.<br><br>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">1> Foo = Bar.<br></blockquote><div><br>Repo:<br>git fetch git@github.com:tjarvstrand/otp.git erlang-font-lock-keyword-vars<br>
<br>Comparison:<br><a href="https://github.com/tjarvstrand/otp/compare/erlang-font-lock-keyword-vars" target="_blank">https://github.com/tjarvstrand/otp/compare/erlang-font-lock-keyword-vars</a><br><a href="https://github.com/tjarvstrand/otp/compare/erlang-font-lock-keyword-vars.patch" target="_blank">https://github.com/tjarvstrand/otp/compare/erlang-font-lock-keyword-vars.patch</a><br>
<br>Regards<br></div>