- or download this
C-h f indent-region
...
3) Indent each line via ‘indent-according-to-mode’.
...
- or download this
2) If ‘indent-region-function’ is non-nil, call that function
to indent the region.
- or download this
If ‘cperl-indent-region-fix-constructs’, will improve spacing on
conditional/loop constructs.