I have the following script working Emacs Auto Indent Mode
it does auto indenting but it has one problem when i start marking regions and go down by lines each time i hit the indention the marking is canceled and it kind-of annoyance me.
How can this be fixed or are there any alternatives? or how can i disable auto indention when marking region is active