added function for electric punctuation in text-mode