(defun insert-^^ () (insert "^^")) (add-hook 'post-self-insert-hook #'insert-^^) (remove-hook 'post-self-insert-hook #'insert-^^)