diff options
| author | Chong Yidong | 2010-09-25 15:50:13 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-09-25 15:50:13 -0400 |
| commit | d24ec09aee53c057d4ff30d84b44aa044d4f6805 (patch) | |
| tree | 27a2052e5a32c6aa32729f8d201d5118d915fa7a /src | |
| parent | 565c0ca57e89ab1a1b4c378c615a998eb8fc0f99 (diff) | |
| download | emacs-d24ec09aee53c057d4ff30d84b44aa044d4f6805.tar.gz emacs-d24ec09aee53c057d4ff30d84b44aa044d4f6805.zip | |
* src/insdel.c (prepare_to_modify_buffer): Ensure the mark marker is alive
before using it (Bug#6977).
Diffstat (limited to 'src')
| -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); |