Delete Selection mode lets you treat an Emacs [[region]] much like a typical text selection outside of Emacs: You can *replace* the [[active region]] just *by typing text*.

According to the Emacs manual,

: ''If you enable Delete Selection mode, a minor mode, then inserting
text while the mark is active causes the selected text to be deleted
first.  This also deactivates the mark.  Many graphical applications
follow this convention, but Emacs does not.''

To turn on this feature by default, either [[customize]] [[option]] `delete-selection-mode' or put the following in your [[init file]]: ##(delete-selection-mode 1)##.



As an EmacsLisp programmer, if you want to *adapt commands* in your own code (e.g. some mode of yours) to `delete-selection-mode', then see this description of the use of [[symbol]] property `delete-selection':
http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00515.html

'''See also:''' TransientMarkMode. Transient Mark mode is automatically enabled in Delete Selection mode.


DrewAdams has slightly modified Delete Selection mode (standard library ##delsel.el##) to be more compatible with Completion mode (standard library ##completion.el##) -- see the version of the library on EmacsWiki: [[delsel.el]].

----
CategoryRegion
