This function makes an extent for the range [from, to) in buffer-or-string (a buffer or string). buffer-or-string defaults to the current buffer. Insertions at point to will be outside of the extent; insertions at from will be inside the extent, causing the extent to grow (see Extent Endpoints). This is the same way that markers behave. The extent is initially detached if both from and to are
nil, and in this case buffer-or-string defaults tonil, meaning the extent is in no buffer or string (see Detached Extents).
This function removes extent from its buffer and destroys it. This does not modify the buffer's text, only its display properties. The extent cannot be used thereafter. To remove an extent in such a way that it can be re-inserted later, use
detach-extent. See Detached Extents.