Mercurial > emacs
changeset 85014:ad5045db16f7
(Fmarker_buffer): Make test for odd case into a failure.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 02 Oct 2007 21:05:39 +0000 |
parents | 92fa2952cd73 |
children | 695c195058e7 |
files | src/marker.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/marker.c Tue Oct 02 21:03:04 2007 +0000 +++ b/src/marker.c Tue Oct 02 21:05:39 2007 +0000 @@ -452,9 +452,12 @@ 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; }