Function: delete-overlay
delete-overlay is a function defined in buffer.c.
Signature
(delete-overlay OVERLAY)
Documentation
Delete the overlay OVERLAY from its buffer.
Other relevant functions are documented in the overlay group.
Shortdoc
;; overlay
(delete-overlay foo)
e.g. => t
Aliases
semantic-overlay-delete (obsolete since 27.1)
speedbar-delete-overlay (obsolete since 27.1)
ediff-delete-overlay (obsolete since 27.1)
reftex-delete-overlay (obsolete since 28.1)
org-detach-overlay (obsolete since 9.0)
Source Code
// Defined in /usr/src/emacs/src/buffer.c
{
struct buffer *b;
specpdl_ref count = SPECPDL_INDEX ();
CHECK_OVERLAY (overlay);
b = OVERLAY_BUFFER (overlay);
if (! b)
return Qnil;
specbind (Qinhibit_quit, Qt);
drop_overlay (XOVERLAY (overlay));
/* When deleting an overlay with before or after strings, turn off
display optimizations for the affected buffer, on the basis that
these strings may contain newlines. This is easier to do than to
check for that situation during redisplay. */
if (!windows_or_buffers_changed
&& (!NILP (Foverlay_get (overlay, Qbefore_string))
|| !NILP (Foverlay_get (overlay, Qafter_string))))
b->prevent_redisplay_optimizations_p = 1;
return unbind_to (count, Qnil);
}