summaryrefslogtreecommitdiff
path: root/doc/lispref/markers.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref/markers.texi')
-rw-r--r--doc/lispref/markers.texi18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi
index d44085527a..bf18543138 100644
--- a/doc/lispref/markers.texi
+++ b/doc/lispref/markers.texi
@@ -659,6 +659,24 @@ more marks than this are pushed onto the @code{mark-ring},
@c There is also global-mark-ring-max, but this chapter explicitly
@c does not talk about the global mark.
+@cindex @code{delete-selection}, symbol property
+@findex delete-selection-helper
+@findex delete-selection-pre-hook
+When Delete Selection mode (@pxref{Using Region, Delete Selection, ,
+emacs, The GNU Emacs Manual}) is enabled, commands that operate on the
+active region (a.k.a.@: ``selection'') behave slightly differently.
+This works by adding the function @code{delete-selection-pre-hook} to
+the @code{pre-command-hook} (@pxref{Command Overview}). That function
+calls @code{delete-selection-helper} to delete the selection as
+appropriate for the command. If you want to adapt a command to Delete
+Selection mode, put the @code{delete-selection} property on the
+function's symbol (@pxref{Symbol Plists}); commands that don't have
+this property on their symbol won't delete the selection. This
+property can have one of several values to tailor the behavior to what
+the command is supposed to do; see the doc strings of
+@code{delete-selection-pre-hook} and @code{delete-selection-helper}
+for the details.
+
@node The Region
@section The Region
@c The index entry must be just "region" to make it the first hit