diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2010-09-25 15:50:13 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2010-09-25 15:50:13 -0400 |
commit | d24ec09aee53c057d4ff30d84b44aa044d4f6805 (patch) | |
tree | 27a2052e5a32c6aa32729f8d201d5118d915fa7a /src/insdel.c | |
parent | 565c0ca57e89ab1a1b4c378c615a998eb8fc0f99 (diff) | |
download | emacs-d24ec09aee53c057d4ff30d84b44aa044d4f6805.tar.gz |
* src/insdel.c (prepare_to_modify_buffer): Ensure the mark marker is alive
before using it (Bug#6977).
Diffstat (limited to 'src/insdel.c')
-rw-r--r-- | src/insdel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/insdel.c b/src/insdel.c index fb26fe77ac2..abe6f350585 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -2051,13 +2051,14 @@ prepare_to_modify_buffer (EMACS_INT start, EMACS_INT end, /* If `select-active-regions' is non-nil, save the region text. */ if (!NILP (current_buffer->mark_active) + && XMARKER (current_buffer->mark)->buffer && NILP (Vsaved_region_selection) && (EQ (Vselect_active_regions, Qonly) ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) : (!NILP (Vselect_active_regions) && !NILP (Vtransient_mark_mode)))) { - EMACS_INT b = XINT (Fmarker_position (current_buffer->mark)); + EMACS_INT b = XMARKER (current_buffer->mark)->charpos; EMACS_INT e = PT; if (b < e) Vsaved_region_selection = make_buffer_string (b, e, 0); |