try to use indent-relative-maybe instead of insert-tab

to get correct indentation in text buffers
simplify has Perl snippet