comparison src/insdel.c @ 109680:b6edc1ea12d7

Avoid restrictions when copying window selection. * src/keyboard.c (command_loop_1): * src/insdel.c (prepare_to_modify_buffer): Don't call validate_region.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 07 Aug 2010 16:26:55 -0400
parents 14830418f9fc
children acc05fd0631b
comparison
equal deleted inserted replaced
109679:0e4b6259df92 109680:b6edc1ea12d7
2053 if (!NILP (Vselect_active_regions) 2053 if (!NILP (Vselect_active_regions)
2054 && !NILP (current_buffer->mark_active) 2054 && !NILP (current_buffer->mark_active)
2055 && !NILP (Vtransient_mark_mode) 2055 && !NILP (Vtransient_mark_mode)
2056 && NILP (Vsaved_region_selection)) 2056 && NILP (Vsaved_region_selection))
2057 { 2057 {
2058 Lisp_Object b = Fmarker_position (current_buffer->mark); 2058 int b = XINT (Fmarker_position (current_buffer->mark));
2059 Lisp_Object e = make_number (PT); 2059 int e = XINT (make_number (PT));
2060 if (NILP (Fequal (b, e))) 2060 if (b < e)
2061 { 2061 Vsaved_region_selection = make_buffer_string (b, e, 0);
2062 validate_region (&b, &e); 2062 else if (b > e)
2063 Vsaved_region_selection = make_buffer_string (XINT (b), XINT (e), 0); 2063 Vsaved_region_selection = make_buffer_string (e, b, 0);
2064 }
2065 } 2064 }
2066 2065
2067 signal_before_change (start, end, preserve_ptr); 2066 signal_before_change (start, end, preserve_ptr);
2068 2067
2069 if (current_buffer->newline_cache) 2068 if (current_buffer->newline_cache)