Variable: delete-selection-save-to-register
delete-selection-save-to-register is a variable defined in
delsel.el.gz.
Value
nil
Documentation
If non-nil, deleted region text is stored in this register.
Value must be the register (key) to use.
Source Code
;; Defined in /usr/src/emacs/lisp/delsel.el.gz
;;; delsel.el --- delete selection if you insert -*- lexical-binding:t -*-
;; Copyright (C) 1992, 1997-1998, 2001-2024 Free Software Foundation,
;; Inc.
;; Author: Matthieu Devin <devin@lucid.com>
;; Maintainer: emacs-devel@gnu.org
;; Created: 14 Jul 92
;; Keywords: convenience emulations
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; This file makes the active region be pending delete, meaning that
;; text inserted while the region is active will replace the region contents.
;; This is a popular behavior of personal computers text editors.
;; Interface:
;; Commands which will delete the selection need a 'delete-selection
;; property on their symbols; commands which insert text but don't
;; have this property won't delete the selection. It can be one of
;; the values:
;; `yank'
;; For commands which do a yank; ensures the region about to be
;; deleted isn't immediately yanked back, which would make the
;; command a no-op.
;; `supersede'
;; Delete the active region and ignore the current command,
;; i.e. the command will just delete the region. This is for
;; commands that normally delete small amounts of text, like
;; a single character -- they will instead delete the whole
;; active region.
;; `kill'
;; `kill-region' is used on the selection, rather than
;; `delete-region'. (Text selected with the mouse will typically
;; be yankable anyhow.)
;; t
;; The normal case: delete the active region prior to executing
;; the command which will insert replacement text.
;; FUNCTION
;; For commands which need to dynamically determine this behavior.
;; FUNCTION should take no argument and return one of the above
;; values, or nil. In the latter case, FUNCTION should itself
;; do with the active region whatever is appropriate."
;;; Code:
(defvar delete-selection-save-to-register nil
"If non-nil, deleted region text is stored in this register.
Value must be the register (key) to use.")