kill-region

kill-region is an interactive compiled Lisp function in `simple.el'.

It is bound to C-w, <S-delete>, <menu-bar> <edit> <cut>.

(kill-region BEG END &optional REGION)

Kill ("cut") text between point and mark.
This deletes the text from the buffer and saves it in the kill ring.
The command C-y can retrieve it from there.
(If you want to save the region without killing it, use M-w.)

If you want to append the killed region to the last killed text,
use C-M-w before C-w.

If the buffer is read-only, Emacs will beep and refrain from deleting
the text, but put the text in the kill ring anyway. This means that
you can use the killing commands to copy text from a read-only buffer.

Lisp programs should use this function for killing text.
(To delete text, use `delete-region'.)
Supply two arguments, character positions indicating the stretch of text
to be killed.
Any command that calls this function is a "kill command".
If the previous command was also a kill command,
the text killed this time appends to the text killed last time
to make one entry in the kill ring.

The optional argument REGION if non-nil, indicates that we're not just killing
some text between BEG and END, but we're killing the region.