diff --git a/src/editfns.c b/src/editfns.c index d5b204e6923..1a72bf02929 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -203,7 +203,8 @@ except in the case that `enable-multibyte-characters' is nil.") int pos; unsigned char *p; - if (MARKERP (position)) + if (MARKERP (position) + && current_buffer == XMARKER (position)->buffer) { pos = marker_position (position); if (pos < BEGV)