diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-10-02 21:05:39 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-10-02 21:05:39 +0000 |
commit | 0754c46a89138d5ef204e571b4c2ca92d59fc93d (patch) | |
tree | e424c563a3fe737ca3a2d20e167021cf5bd24256 /src/marker.c | |
parent | 85e616ab18878e7df53553457cbf5888a52c3f00 (diff) | |
download | emacs-0754c46a89138d5ef204e571b4c2ca92d59fc93d.tar.gz |
(Fmarker_buffer): Make test for odd case into a failure.
Diffstat (limited to 'src/marker.c')
-rw-r--r-- | src/marker.c | 9 |
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. */) if (XMARKER (marker)->buffer) { XSETBUFFER (buf, XMARKER (marker)->buffer); - /* Return marker's buffer only if it is not dead. */ - if (!NILP (XBUFFER (buf)->name)) - return buf; + /* If the buffer is dead, we're in trouble: the buffer pointer here + does not preserve the buffer from being GC'd (it's weak), so + markers have to be unlinked from their buffer as soon as the buffer + is killed. */ + eassert (!NILP (XBUFFER (buf)->name)); + return buf; } return Qnil; } |