How can I replace highlighted text with what I type?
====================================================
Use `delete-selection-mode', which you can start automatically by
placing the following Lisp form in your `.emacs' file:
(delete-selection-mode t)
According to the documentation string for `delete-selection-mode'
(which you can read using `M-x describe-function <RET>
delete-selection-mode <RET>'):
When ON, typed text replaces the selection if the selection is
active. When OFF, typed text is just inserted at point.
This mode also allows you to delete (not kill) the highlighted
region by pressing <DEL>.