Homepage: https://www.gnu.org/software/emacs
Author: Matthieu Devin
Delete selection if you insert
This file makes the active region be pending delete, meaning that text inserted while the region is active will replace the region contents. This is a popular behavior of personal computers text editors. Interface: Commands which will delete the selection need a 'delete-selection property on their symbols; commands which insert text but don't have this property won't delete the selection. It can be one of the values: `yank' For commands which do a yank; ensures the region about to be deleted isn't immediately yanked back, which would make the command a no-op. `supersede' Delete the active region and ignore the current command, i.e. the command will just delete the region. This is for commands that normally delete small amounts of text, like a single character -- they will instead delete the whole active region. `kill' `kill-region' is used on the selection, rather than `delete-region'. (Text selected with the mouse will typically be yankable anyhow.) t The normal case: delete the active region prior to executing the command which will insert replacement text. FUNCTION For commands which need to dynamically determine this behavior. FUNCTION should take no argument and return one of the above values, or nil. In the latter case, FUNCTION should itself do with the active region whatever is appropriate."