<div class="ajy"><img class="ajz" id=":az" tabindex="0" src="https://mail.google.com/mail/u/1/images/cleardot.gif" alt=""></div>Hi!<br><br>I've updated the patch.<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 exchanges the straight regexp with a fun that searches for a match for erlang-variable-regexp and then asserts that the match is not preceeded by a #, thus relieving the requirement of at least one preceeding character to be present in the search range before a 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><br>Repo:<br>git fetch git@github.com:tjarvstrand/<div>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>Thomas Järvstrand<br></div><br><br><div class="gmail_quote">2012/11/6 Thomas Järvstrand <span dir="ltr"><<a href="mailto:tjarvstrand@gmail.com" target="_blank">tjarvstrand@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Please disregard this patch, it does not work as intended. Sorry for the noise.<span class="HOEnZb"><font color="#888888"><br><br>Thomas</font></span><div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">2012/11/6 Thomas Järvstrand <span dir="ltr"><<a href="mailto:tjarvstrand@gmail.com" target="_blank">tjarvstrand@gmail.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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>
</blockquote></div><br>
</div></div></blockquote></div><br>