Function: delete-and-extract-region

delete-and-extract-region is a function defined in editfns.c.

Signature

(delete-and-extract-region START END)

Documentation

Delete the text between START and END and return it.

View in manual

Probably introduced at or before Emacs version 21.1.

Source Code

// Defined in /usr/src/emacs/src/editfns.c
{
  validate_region (&start, &end);
  if (XFIXNUM (start) == XFIXNUM (end))
    return empty_unibyte_string;
  return del_range_1 (XFIXNUM (start), XFIXNUM (end), 1, 1);
}