Doing a lot of work with interpreters that need semi-colons to tell them when a line ends recently – and making flymake be quiet about it involves a whole sequence of C-e … ; … what was I thinking about again?
So thanks to this, C-M-; now colonizes the line and leaves me happily where I was
(defun colonize () "For languages that insist on putting a colon at the end of a line, do that. But stay where you're thinking is at." (interactive) (save-excursion (move-end-of-line nil) (insert ";"))) (global-set-key (kbd "C-M-;") 'colonize)
Love regards etc