It seems working fine. Just a couple of things that could be changed.
In smart tab mode pressing ENTER after any right gretl tag/statement should
behave like it was ENTER and then TAB. That will move the cursor at the new
line and at the right indented position.
If this wouldn't be the right position ( for example if the previous line
was the last one of an If branch) BACKSPACE should move the cursor one tab
back, and only one space.
In normal mode it would fine to keep the focus on the previously highlighted
code after each TAB/SHIFT^TAB. It will allow fast tab sliding for that code
portion.
Finally the icing on the cake..
In smart tab mode, selecting all the text and pressing TAB shouldn't
automatically indent what's inside a multi-line comments cause often what's
there is deliberately not indented.
Cheers