emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101617: * src/insdel.c (prepare_to_m


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101617: * src/insdel.c (prepare_to_modify_buffer): Ensure the mark marker is alive
Date: Sat, 25 Sep 2010 15:50:13 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101617
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2010-09-25 15:50:13 -0400
message:
  * src/insdel.c (prepare_to_modify_buffer): Ensure the mark marker is alive
  before using it (Bug#6977).
modified:
  src/ChangeLog
  src/insdel.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-09-25 16:39:13 +0000
+++ b/src/ChangeLog     2010-09-25 19:50:13 +0000
@@ -1,3 +1,8 @@
+2010-09-25  Chong Yidong  <address@hidden>
+
+       * insdel.c (prepare_to_modify_buffer): Ensure the mark marker is
+       alive before using it (Bug#6977).
+
 2010-09-25  Lars Magne Ingebrigtsen  <address@hidden>
 
        * xdisp.c (face_before_or_after_it_pos): EMACS_INT/int fixup.

=== modified file 'src/insdel.c'
--- a/src/insdel.c      2010-09-22 16:03:34 +0000
+++ b/src/insdel.c      2010-09-25 19:50:13 +0000
@@ -2051,13 +2051,14 @@
 
   /* 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);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]