/[emacs]/emacs/src/insdel.c
ViewVC logotype

Diff of /emacs/src/insdel.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.172 by fx, Wed Oct 30 19:03:54 2002 UTC revision 1.173 by lektu, Tue Feb 4 14:03:12 2003 UTC
# Line 373  adjust_markers_for_delete (from, from_by Line 373  adjust_markers_for_delete (from, from_by
373            if (! m->insertion_type)            if (! m->insertion_type)
374              /* Normal markers will end up at the beginning of the              /* Normal markers will end up at the beginning of the
375                 re-inserted text after undoing a deletion, and must be                 re-inserted text after undoing a deletion, and must be
376                 adjusted to move them to the correct place.  */                 adjusted to move them to the correct place.  */
377              record_marker_adjustment (marker, from - charpos);              record_marker_adjustment (marker, from - charpos);
378            else if (charpos < to)            else if (charpos < to)
379              /* Before-insertion markers will automatically move forward              /* Before-insertion markers will automatically move forward
# Line 536  make_gap_larger (nbytes_added) Line 536  make_gap_larger (nbytes_added)
536       That won't work because so many places use `int'.       That won't work because so many places use `int'.
537    
538       Make sure we don't introduce overflows in the calculation.  */       Make sure we don't introduce overflows in the calculation.  */
539        
540    if (Z_BYTE - BEG_BYTE + GAP_SIZE    if (Z_BYTE - BEG_BYTE + GAP_SIZE
541        >= (((EMACS_INT) 1 << (min (VALBITS, BITS_PER_INT) - 1)) - 1        >= (((EMACS_INT) 1 << (min (VALBITS, BITS_PER_INT) - 1)) - 1
542            - nbytes_added))            - nbytes_added))
# Line 990  insert_1_both (string, nchars, nbytes, i Line 990  insert_1_both (string, nchars, nbytes, i
990  {  {
991    if (nchars == 0)    if (nchars == 0)
992      return;      return;
993      
994    if (NILP (current_buffer->enable_multibyte_characters))    if (NILP (current_buffer->enable_multibyte_characters))
995      nchars = nbytes;      nchars = nbytes;
996    
# Line 1173  insert_from_string_1 (string, pos, pos_b Line 1173  insert_from_string_1 (string, pos, pos_b
1173    /* Get the intervals for the part of the string we are inserting.  */    /* Get the intervals for the part of the string we are inserting.  */
1174    if (nbytes < SBYTES (string))    if (nbytes < SBYTES (string))
1175      intervals = copy_intervals (intervals, pos, nchars);      intervals = copy_intervals (intervals, pos, nchars);
1176                                  
1177    /* Insert those intervals.  */    /* Insert those intervals.  */
1178    graft_intervals_into_buffer (intervals, PT, nchars,    graft_intervals_into_buffer (intervals, PT, nchars,
1179                                 current_buffer, inherit);                                 current_buffer, inherit);
# Line 1239  insert_from_buffer_1 (buf, from, nchars, Line 1239  insert_from_buffer_1 (buf, from, nchars,
1239    
1240        if (chunk < incoming_nbytes)        if (chunk < incoming_nbytes)
1241          outgoing_after_gap          outgoing_after_gap
1242            = count_size_as_multibyte (BUF_BYTE_ADDRESS (buf,            = count_size_as_multibyte (BUF_BYTE_ADDRESS (buf,
1243                                                         from_byte + chunk),                                                         from_byte + chunk),
1244                                       incoming_nbytes - chunk);                                       incoming_nbytes - chunk);
1245    
1246        outgoing_nbytes = outgoing_before_gap + outgoing_after_gap;        outgoing_nbytes = outgoing_before_gap + outgoing_after_gap;
1247      }      }
1248      
1249    /* Make sure point-max won't overflow after this insertion.  */    /* Make sure point-max won't overflow after this insertion.  */
1250    XSETINT (temp, outgoing_nbytes + Z);    XSETINT (temp, outgoing_nbytes + Z);
1251    if (outgoing_nbytes + Z != XINT (temp))    if (outgoing_nbytes + Z != XINT (temp))
# Line 1329  insert_from_buffer_1 (buf, from, nchars, Line 1329  insert_from_buffer_1 (buf, from, nchars,
1329          from += nchars;          from += nchars;
1330        intervals = copy_intervals (intervals, from, nchars);        intervals = copy_intervals (intervals, from, nchars);
1331      }      }
1332                                  
1333    /* Insert those intervals.  */    /* Insert those intervals.  */
1334    graft_intervals_into_buffer (intervals, PT, nchars, current_buffer, inherit);    graft_intervals_into_buffer (intervals, PT, nchars, current_buffer, inherit);
1335    
# Line 2129  signal_after_change (charpos, lendel, le Line 2129  signal_after_change (charpos, lendel, le
2129        return;        return;
2130      }      }
2131    
2132    if (!NILP (combine_after_change_list))    if (!NILP (combine_after_change_list))
2133      Fcombine_after_change_execute ();      Fcombine_after_change_execute ();
2134    
2135    if (!NILP (Vafter_change_functions))    if (!NILP (Vafter_change_functions))
# Line 2260  DEFUN ("combine-after-change-execute", F Line 2260  DEFUN ("combine-after-change-execute", F
2260       that was changed.  */       that was changed.  */
2261    begpos = BEG + beg;    begpos = BEG + beg;
2262    endpos = Z - end;    endpos = Z - end;
2263      
2264    /* We are about to handle these, so discard them.  */    /* We are about to handle these, so discard them.  */
2265    combine_after_change_list = Qnil;    combine_after_change_list = Qnil;
2266    

Legend:
Removed from v.1.172  
changed lines
  Added in v.1.173

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26