mod: refactory buffer-indent functions