Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
d4f5719a
Commit
d4f5719a
authored
Jul 22, 2003
by
Stefan Monnier
Browse files
(delete_all_overlays): New function.
parent
1dd7ccf2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
src/buffer.c
src/buffer.c
+29
-1
No files found.
src/buffer.c
View file @
d4f5719a
...
...
@@ -630,8 +630,36 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
return
buf
;
}
void
delete_all_overlays
(
b
)
struct
buffer
*
b
;
{
Lisp_Object
overlay
;
/* `reset_buffer' blindly sets the list of overlays to NULL, so we
have to empty the list, otherwise we end up with overlays that
think they belong to this buffer while the buffer doesn't know about
them any more. */
while
(
b
->
overlays_before
)
{
XSETMISC
(
overlay
,
b
->
overlays_before
);
Fdelete_overlay
(
overlay
);
}
while
(
b
->
overlays_after
)
{
XSETMISC
(
overlay
,
b
->
overlays_after
);
Fdelete_overlay
(
overlay
);
}
eassert
(
b
->
overlays_before
==
NULL
);
eassert
(
b
->
overlays_after
==
NULL
);
}
/* Reinitialize everything about a buffer except its name and contents
and local variables. */
and local variables.
If called on an already-initialized buffer, the list of overlays
should be deleted before calling this function, otherwise we end up
with overlays that claim to belong to the buffer but the buffer
claims it doesn't belong to it. */
void
reset_buffer
(
b
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment