add newline-and-insert-close-bracket and insert-pair-char function