Variable: delete-selection-mode-hook

delete-selection-mode-hook is a customizable variable defined in delsel.el.gz.

Value

nil

Documentation

Hook run after entering or leaving delete-selection-mode(var)/delete-selection-mode(fun).

No problems result if this variable is not bound. add-hook automatically binds it. (This is true for all hook variables.)

Source Code

;; Defined in /usr/src/emacs/lisp/delsel.el.gz
;;;###autoload
(define-minor-mode delete-selection-mode
  "Toggle Delete Selection mode.

When Delete Selection mode is enabled, typed text replaces the selection
if the selection is active.  Otherwise, typed text is just inserted at
point regardless of any selection.

See `delete-selection-helper' and `delete-selection-pre-hook' for
information on adapting behavior of commands in Delete Selection mode."
  :global t :group 'editing-basics
  (if (not delete-selection-mode)
      (remove-hook 'pre-command-hook 'delete-selection-pre-hook)
    (add-hook 'pre-command-hook 'delete-selection-pre-hook)))