aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2007-10-02 21:05:39 +0000
committerStefan Monnier2007-10-02 21:05:39 +0000
commit0754c46a89138d5ef204e571b4c2ca92d59fc93d (patch)
treee424c563a3fe737ca3a2d20e167021cf5bd24256 /src
parent85e616ab18878e7df53553457cbf5888a52c3f00 (diff)
downloademacs-0754c46a89138d5ef204e571b4c2ca92d59fc93d.tar.gz
emacs-0754c46a89138d5ef204e571b4c2ca92d59fc93d.zip
(Fmarker_buffer): Make test for odd case into a failure.
Diffstat (limited to 'src')
-rw-r--r--src/marker.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/marker.c b/src/marker.c
index a57dafa3f3b..0c89f71d79a 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -452,9 +452,12 @@ Returns nil if MARKER points into a dead buffer. */)
452 if (XMARKER (marker)->buffer) 452 if (XMARKER (marker)->buffer)
453 { 453 {
454 XSETBUFFER (buf, XMARKER (marker)->buffer); 454 XSETBUFFER (buf, XMARKER (marker)->buffer);
455 /* Return marker's buffer only if it is not dead. */ 455 /* If the buffer is dead, we're in trouble: the buffer pointer here
456 if (!NILP (XBUFFER (buf)->name)) 456 does not preserve the buffer from being GC'd (it's weak), so
457 return buf; 457 markers have to be unlinked from their buffer as soon as the buffer
458 is killed. */
459 eassert (!NILP (XBUFFER (buf)->name));
460 return buf;
458 } 461 }
459 return Qnil; 462 return Qnil;
460} 463}