(defun append-char (start end string) "Append character(s) at the end of region" (interactive "r\nsChar to insert: ") (save-excursion (goto-char start) (while (and (<= (point) end) (re-search-forward "$" (1+ end) nil)) (insert string) (forward-char 1))))