summaryrefslogtreecommitdiff
path: root/src/insdel.c
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2010-08-07 16:26:55 -0400
committerChong Yidong <cyd@stupidchicken.com>2010-08-07 16:26:55 -0400
commitb15762e789b2702f38699009cce69fdf2cb65df9 (patch)
treedcb2cb1100a9019fabf74f3b3db13708e8bfea2f /src/insdel.c
parent36ddd8ec7f4918a90331f01744d06b253cc7b3f7 (diff)
downloademacs-b15762e789b2702f38699009cce69fdf2cb65df9.tar.gz
Avoid restrictions when copying window selection.
* src/keyboard.c (command_loop_1): * src/insdel.c (prepare_to_modify_buffer): Don't call validate_region.
Diffstat (limited to 'src/insdel.c')
-rw-r--r--src/insdel.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/insdel.c b/src/insdel.c
index ac220d6b74b..00025808e37 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -2055,13 +2055,12 @@ prepare_to_modify_buffer (EMACS_INT start, EMACS_INT end,
&& !NILP (Vtransient_mark_mode)
&& NILP (Vsaved_region_selection))
{
- Lisp_Object b = Fmarker_position (current_buffer->mark);
- Lisp_Object e = make_number (PT);
- if (NILP (Fequal (b, e)))
- {
- validate_region (&b, &e);
- Vsaved_region_selection = make_buffer_string (XINT (b), XINT (e), 0);
- }
+ int b = XINT (Fmarker_position (current_buffer->mark));
+ int e = XINT (make_number (PT));
+ if (b < e)
+ Vsaved_region_selection = make_buffer_string (b, e, 0);
+ else if (b > e)
+ Vsaved_region_selection = make_buffer_string (e, b, 0);
}
signal_before_change (start, end, preserve_ptr);