Function: delete-selection-pre-hook

delete-selection-pre-hook is a byte-compiled function defined in kotl-mode.el.

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.

View in manual

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kotl-mode.el
(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))
    (let ((deletion-type (and (symbolp this-command)
			      (get this-command 'delete-selection))))
      (when (and deletion-type (kotl-mode:maybe-shrink-region-p))
	(delete-selection-helper deletion-type)))))