[erlang-patches] [erlang-bugs] erlang.el indenter

Tomas Abrahamsson tomas.abrahamsson@REDACTED
Tue Aug 28 23:10:25 CEST 2012


On Thu, Aug 23, 2012 at 12:07 AM, Tuncer Ayaz <tuncer.ayaz@REDACTED> wrote:
> On Wed, Aug 22, 2012 at 11:42 PM, Tomas Abrahamsson wrote:
>>>>> Here is a patch for indenting of multi-line strings
>>
>>> A quick test revealed that erlang.el from 'pu' erroneously
>>> re-indents the already correctly indented rebar:option_spec_list/0
>>> and also rebar:commands/0. Can you reproduce the regression?
>>
>> I see what you mean. Will try to fix it.
>
> Thanks. Are the erlang.el changes in 'pu' susceptible to new
> mis-indentations by nature? The original issue is not important
> enough to introduce regressions if fixing it means erlang.el
> will get imprecise or hard to get right.

For the time being, would it be possible to
back this patch out from pu? Not sure if I can fix it
in time for the upcoming release.

Apologies for any trouble this may cause.

The solution path I ventured into was not a good one,
I realized. I had only tried it with an older version
of rebar, so didn't catch the mis-indentation.

> Out of curiosity, what about using erl_parse, erl_scan, etc. via an
> escript instead? Does that sound viable and make sense?

That might be a possibility, although, it might
require another grammar than the ordinary erlang
grammar, there are some issues one would need
to handle: being able to indent before the function
is completely written, and being able to indent
comments. Also, I guess macros could be a
challenge.

BRs
Tomas



More information about the erlang-patches mailing list