[erlang-bugs] Emacs package: Local function named "get" highlighted like built-in functions

Steve Vinoski vinoski@REDACTED
Sun Mar 29 21:06:39 CEST 2015


On Sun, Mar 29, 2015 at 2:02 PM, Jesper Louis Andersen <
jesper.louis.andersen@REDACTED> wrote:

>
> On Sun, Mar 29, 2015 at 5:47 PM, Luis Gerhorst <
> erlang-bugs-mailing-list@REDACTED> wrote:
>
>> I'm using solarized-theme (https://github.com/bbatsov/solarized-emacs
>> <http://github.com/bbatsov/solarized-emacs>) and as you can see in the
>> screenshot the local function "get" is highlighted the same way built in
>> functions from the "erlang" module are highlighted.
>>
>
> I have a guess as to why this happens. The get/1 function is defined in
> erlang:get/1. It is used to look up values in the process dictionary. The
> syntax highlighter doesn't understand that get/2 is defined locally in the
> current module, so it thinks your call to get is to the underlying
> 'erlang:get/1', not to ?MODULE:get/2. And all problems stems from there.
>

Correct -- see lib/tools/emacs/erlang.el on the maint branch, line 759 (I
would link to github but it's being ddos'ed right now so I can't get to
it), where "get" is specified as part of an elisp variable holding erlang
bif names. Erlang-mode highlights those names as symbols.

--steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20150329/57f26dc7/attachment.htm>


More information about the erlang-bugs mailing list