,----[ C-h f delete-selection-mode RET ]
| delete-selection-mode is an interactive autoloaded Lisp function in
`delsel'.
| [Arg list not available until function definition is loaded.]
|
| Toggle Delete Selection mode.
| With prefix ARG, turn Delete Selection mode on if and only if ARG is
| positive.
|
| When Delete Selection mode is enabled, Transient Mark mode is also
| enabled and typed text replaces the selection if the selection is
| active. Otherwise, typed text is just inserted at point regardless of
| any selection.
`----
This is for GNU emacs; don't know whether it works for XEmacs.