Closed yuutayamada closed 8 years ago
Should I remove highlight branch's commits? I thought it will disappear after merging #72, but please let me know I'm doing wrong.
I think I shouldn't. Once I thought it should be dedented, but I realized
that we can write other statement or elif/else statement after that if.
(But if the break
is only one token in the line, dedent next line FYI)
Then change that test to contain break
as the only token in the line.
There are break
tests already in block/while/for, so I merged it.
I changed the break's behavior if the line is else: break
:
block:
if true: echo "else break"
else: break
echo "`else` with `break` should be dedented"
Also I added finally: break
. Probably no more exception? (except template/macro)
Sorry, I was moron. Even if it's else/finally, it doesn't mean next line should be dedented. There is still possibility to indent as same previous line. I'm not sure what is best way...
I made customize variable for it, so users can change the behavior.
Sorry, for those some fixes. I didn't much check about single line including ":". (it worked old indentation code, so). I hope getting stable...
This PR fix following case
and most commit are refactoring to avoid avoid smie.el's warnings like
;
is both neither and closer. (I seem there is no critical effect, but not good to see.)