diff options
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/insdel.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 38b24f8559b..29071a36b0e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-09-25 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * insdel.c (prepare_to_modify_buffer): Ensure the mark marker is | ||
| 4 | alive before using it (Bug#6977). | ||
| 5 | |||
| 1 | 2010-09-25 Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | 2010-09-25 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 7 | ||
| 3 | * xdisp.c (face_before_or_after_it_pos): EMACS_INT/int fixup. | 8 | * xdisp.c (face_before_or_after_it_pos): EMACS_INT/int fixup. |
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, | |||
| 2051 | 2051 | ||
| 2052 | /* If `select-active-regions' is non-nil, save the region text. */ | 2052 | /* If `select-active-regions' is non-nil, save the region text. */ |
| 2053 | if (!NILP (current_buffer->mark_active) | 2053 | if (!NILP (current_buffer->mark_active) |
| 2054 | && XMARKER (current_buffer->mark)->buffer | ||
| 2054 | && NILP (Vsaved_region_selection) | 2055 | && NILP (Vsaved_region_selection) |
| 2055 | && (EQ (Vselect_active_regions, Qonly) | 2056 | && (EQ (Vselect_active_regions, Qonly) |
| 2056 | ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) | 2057 | ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) |
| 2057 | : (!NILP (Vselect_active_regions) | 2058 | : (!NILP (Vselect_active_regions) |
| 2058 | && !NILP (Vtransient_mark_mode)))) | 2059 | && !NILP (Vtransient_mark_mode)))) |
| 2059 | { | 2060 | { |
| 2060 | EMACS_INT b = XINT (Fmarker_position (current_buffer->mark)); | 2061 | EMACS_INT b = XMARKER (current_buffer->mark)->charpos; |
| 2061 | EMACS_INT e = PT; | 2062 | EMACS_INT e = PT; |
| 2062 | if (b < e) | 2063 | if (b < e) |
| 2063 | Vsaved_region_selection = make_buffer_string (b, e, 0); | 2064 | Vsaved_region_selection = make_buffer_string (b, e, 0); |