Function: delete-selection-pre-hook
delete-selection-pre-hook is a byte-compiled function defined in
delsel.el.gz.
Signature
(delete-selection-pre-hook)
Documentation
Function run before commands that delete selections are executed.
Commands which will delete the selection need a delete-selection
property on their symbol; commands which insert text but don't
have this property won't delete the selection.
See delete-selection-helper.
Source Code
;; Defined in /usr/src/emacs/lisp/delsel.el.gz
(defun delete-selection-pre-hook ()
"Function run before commands that delete selections are executed.
Commands which will delete the selection need a `delete-selection'
property on their symbol; commands which insert text but don't
have this property won't delete the selection.
See `delete-selection-helper'."
(when (and delete-selection-mode (use-region-p)
(not buffer-read-only))
(delete-selection-helper (and (symbolp this-command)
(get this-command 'delete-selection)))))