Function: delete-active-region
delete-active-region is an autoloaded, interactive and byte-compiled
function defined in delsel.el.gz.
Signature
(delete-active-region &optional KILLP)
Documentation
Delete the active region.
If KILLP is non-nil, or if called interactively with a prefix argument, the active region is killed instead of deleted.
Probably introduced at or before Emacs version 24.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/delsel.el.gz
;;;###autoload
(defun delete-active-region (&optional killp)
"Delete the active region.
If KILLP is non-nil, or if called interactively with a prefix argument,
the active region is killed instead of deleted."
(interactive "P")
(cond
(killp
;; Don't allow `kill-region' to change the value of `this-command'.
(let (this-command)
(kill-region (point) (mark) t)))
(delete-selection-save-to-register
(set-register delete-selection-save-to-register
(funcall region-extract-function t))
(setq delsel--replace-text-or-position
(cons (current-buffer)
(and (consp buffer-undo-list) (car buffer-undo-list)))))
(t
(funcall region-extract-function 'delete-only))))