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
389a94a5
Commit
389a94a5
authored
Oct 11, 2012
by
Stefan Monnier
Browse files
* src/buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
parent
d8cc4c00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
11 deletions
+22
-11
src/ChangeLog
src/ChangeLog
+2
-0
src/buffer.c
src/buffer.c
+20
-11
No files found.
src/ChangeLog
View file @
389a94a5
2012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
* buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
* eval.c (Fautoload): Remember previous autoload status in load-history.
2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
...
...
src/buffer.c
View file @
389a94a5
...
...
@@ -897,6 +897,8 @@ delete_all_overlays (struct buffer *b)
{
struct
Lisp_Overlay
*
ov
,
*
next
;
/* FIXME: Since each drop_overlay will scan BUF_MARKERS to unlink its
markers, we have an unneeded O(N^2) behavior here. */
for
(
ov
=
b
->
overlays_before
;
ov
;
ov
=
next
)
{
drop_overlay
(
b
,
ov
);
...
...
@@ -1886,16 +1888,19 @@ cleaning up all windows currently displaying the buffer to be killed. */)
if
(
b
->
base_buffer
)
{
/* Unchain all markers that belong to this indirect buffer.
Don't unchain the markers that belong to the base buffer
or its other indirect buffers. */
for
(
m
=
BUF_MARKERS
(
b
);
m
;
)
{
struct
Lisp_Marker
*
next
=
m
->
next
;
if
(
m
->
buffer
==
b
)
unchain_marker
(
m
);
m
=
next
;
}
{
/* Unchain all markers that belong to this indirect buffer.
Don't unchain the markers that belong to the base buffer
or its other indirect buffers. */
struct
Lisp_Marker
**
mp
;
for
(
mp
=
&
BUF_MARKERS
(
b
);
*
mp
;
)
{
struct
Lisp_Marker
*
m
=
*
mp
;
if
(
m
->
buffer
==
b
)
*
mp
=
m
->
next
;
else
mp
=
&
m
->
next
;
}
}
}
else
{
...
...
@@ -1911,8 +1916,12 @@ cleaning up all windows currently displaying the buffer to be killed. */)
BUF_MARKERS
(
b
)
=
NULL
;
set_buffer_intervals
(
b
,
NULL
);
/* Perhaps we should explicitly free the interval tree here... */
/* Perhaps we should explicitly free the interval tree here...
*/
}
/* Since we've unlinked the markers, the overlays can't be here any more
either. */
b
->
overlays_before
=
NULL
;
b
->
overlays_after
=
NULL
;
/* Reset the local variables, so that this buffer's local values
won't be protected from GC. They would be protected
...
...
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