comparison src/editfns.c @ 6772:6e53158ad17d

(make_buffer_string): Copy properties whenever we have some even if they don't change.
author Richard M. Stallman <rms@gnu.org>
date Sat, 09 Apr 1994 19:34:45 +0000
parents ce9404705b14
children 175e4da3d3f4
comparison
equal deleted inserted replaced
6771:0cedd76336a0 6772:6e53158ad17d
898 898
899 Lisp_Object 899 Lisp_Object
900 make_buffer_string (start, end) 900 make_buffer_string (start, end)
901 int start, end; 901 int start, end;
902 { 902 {
903 Lisp_Object result, tem; 903 Lisp_Object result, tem, tem1;
904 904
905 if (start < GPT && GPT < end) 905 if (start < GPT && GPT < end)
906 move_gap (start); 906 move_gap (start);
907 907
908 result = make_uninit_string (end - start); 908 result = make_uninit_string (end - start);
909 bcopy (&FETCH_CHAR (start), XSTRING (result)->data, end - start); 909 bcopy (&FETCH_CHAR (start), XSTRING (result)->data, end - start);
910 910
911 tem = Fnext_property_change (make_number (start), Qnil, make_number (end)); 911 tem = Fnext_property_change (make_number (start), Qnil, make_number (end));
912 tem1 = Ftext_properties_at (make_number (start), Qnil);
912 913
913 #ifdef USE_TEXT_PROPERTIES 914 #ifdef USE_TEXT_PROPERTIES
914 if (XINT (tem) != end) 915 if (XINT (tem) != end || !NILP (tem1))
915 copy_intervals_to_string (result, current_buffer, start, end - start); 916 copy_intervals_to_string (result, current_buffer, start, end - start);
916 #endif 917 #endif
917 918
918 return result; 919 return result;
919 } 920 }