Function: delete-selection-uses-region-p

delete-selection-uses-region-p is a byte-compiled function defined in delsel.el.gz.

Signature

(delete-selection-uses-region-p)

Documentation

Return t when delete-selection-mode(var)/delete-selection-mode(fun) should not delete the region.

The self-insert-command could be the current command or may be called by the current command. If this function returns nil, then delete-selection is allowed to delete the region.

This function is intended for use as the value of the delete-selection property of a command, and shouldn't be used for anything else. In particular, self-insert-command has this function as its delete-selection property, so that "electric" self-insert commands that act on the region could adapt themselves to delete-selection-mode(var)/delete-selection-mode(fun).

Source Code

;; Defined in /usr/src/emacs/lisp/delsel.el.gz
(defun delete-selection-uses-region-p ()
  "Return t when `delete-selection-mode' should not delete the region.

The `self-insert-command' could be the current command or may be
called by the current command.  If this function returns nil,
then `delete-selection' is allowed to delete the region.

This function is intended for use as the value of the
`delete-selection' property of a command, and shouldn't be used
for anything else.  In particular, `self-insert-command' has this
function as its `delete-selection' property, so that \"electric\"
self-insert commands that act on the region could adapt themselves
to `delete-selection-mode'."
  (not (run-hook-with-args-until-success
        'self-insert-uses-region-functions)))