emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/insdel.c


From: Ken Raeburn
Subject: [Emacs-diffs] Changes to emacs/src/insdel.c
Date: Sun, 14 Jul 2002 20:00:52 -0400

Index: emacs/src/insdel.c
diff -c emacs/src/insdel.c:1.168 emacs/src/insdel.c:1.169
*** emacs/src/insdel.c:1.168    Thu Jul 11 10:12:03 2002
--- emacs/src/insdel.c  Sun Jul 14 20:00:36 2002
***************
*** 1111,1117 ****
      outgoing_nbytes = nchars;
    else if (! STRING_MULTIBYTE (string))
      outgoing_nbytes
!       = count_size_as_multibyte (&XSTRING (string)->data[pos_byte],
                                 nbytes);
  
    GCPRO1 (string);
--- 1111,1117 ----
      outgoing_nbytes = nchars;
    else if (! STRING_MULTIBYTE (string))
      outgoing_nbytes
!       = count_size_as_multibyte (&SREF (string, pos_byte),
                                 nbytes);
  
    GCPRO1 (string);
***************
*** 1128,1134 ****
  
    /* Copy the string text into the buffer, perhaps converting
       between single-byte and multibyte.  */
!   copy_text (XSTRING (string)->data + pos_byte, GPT_ADDR, nbytes,
             STRING_MULTIBYTE (string),
             ! NILP (current_buffer->enable_multibyte_characters));
  
--- 1128,1134 ----
  
    /* Copy the string text into the buffer, perhaps converting
       between single-byte and multibyte.  */
!   copy_text (SDATA (string) + pos_byte, GPT_ADDR, nbytes,
             STRING_MULTIBYTE (string),
             ! NILP (current_buffer->enable_multibyte_characters));
  
***************
*** 1169,1177 ****
  
    offset_intervals (current_buffer, PT, nchars);
  
!   intervals = XSTRING (string)->intervals;
    /* Get the intervals for the part of the string we are inserting.  */
!   if (nbytes < STRING_BYTES (XSTRING (string)))
      intervals = copy_intervals (intervals, pos, nchars);
                               
    /* Insert those intervals.  */
--- 1169,1177 ----
  
    offset_intervals (current_buffer, PT, nchars);
  
!   intervals = STRING_INTERVALS (string);
    /* Get the intervals for the part of the string we are inserting.  */
!   if (nbytes < SBYTES (string))
      intervals = copy_intervals (intervals, pos, nchars);
                               
    /* Insert those intervals.  */
***************
*** 1358,1365 ****
  
    if (STRINGP (prev_text))
      {
!       nchars_del = XSTRING (prev_text)->size;
!       nbytes_del = STRING_BYTES (XSTRING (prev_text));
      }
  
    /* Update various buffer positions for the new text.  */
--- 1358,1365 ----
  
    if (STRINGP (prev_text))
      {
!       nchars_del = SCHARS (prev_text);
!       nbytes_del = SBYTES (prev_text);
      }
  
    /* Update various buffer positions for the new text.  */
***************
*** 1493,1500 ****
       Lisp_Object new;
       int from, to, prepare, inherit, markers;
  {
!   int inschars = XSTRING (new)->size;
!   int insbytes = STRING_BYTES (XSTRING (new));
    int from_byte, to_byte;
    int nbytes_del, nchars_del;
    register Lisp_Object temp;
--- 1493,1500 ----
       Lisp_Object new;
       int from, to, prepare, inherit, markers;
  {
!   int inschars = SCHARS (new);
!   int insbytes = SBYTES (new);
    int from_byte, to_byte;
    int nbytes_del, nchars_del;
    register Lisp_Object temp;
***************
*** 1539,1545 ****
      outgoing_insbytes = inschars;
    else if (! STRING_MULTIBYTE (new))
      outgoing_insbytes
!       = count_size_as_multibyte (XSTRING (new)->data, insbytes);
  
    /* Make sure point-max won't overflow after this insertion.  */
    XSETINT (temp, Z_BYTE - nbytes_del + insbytes);
--- 1539,1545 ----
      outgoing_insbytes = inschars;
    else if (! STRING_MULTIBYTE (new))
      outgoing_insbytes
!       = count_size_as_multibyte (SDATA (new), insbytes);
  
    /* Make sure point-max won't overflow after this insertion.  */
    XSETINT (temp, Z_BYTE - nbytes_del + insbytes);
***************
*** 1582,1588 ****
  
    /* Copy the string text into the buffer, perhaps converting
       between single-byte and multibyte.  */
!   copy_text (XSTRING (new)->data, GPT_ADDR, insbytes,
             STRING_MULTIBYTE (new),
             ! NILP (current_buffer->enable_multibyte_characters));
  
--- 1582,1588 ----
  
    /* Copy the string text into the buffer, perhaps converting
       between single-byte and multibyte.  */
!   copy_text (SDATA (new), GPT_ADDR, insbytes,
             STRING_MULTIBYTE (new),
             ! NILP (current_buffer->enable_multibyte_characters));
  
***************
*** 1629,1635 ****
  
    /* Get the intervals for the part of the string we are inserting--
       not including the combined-before bytes.  */
!   intervals = XSTRING (new)->intervals;
    /* Insert those intervals.  */
    graft_intervals_into_buffer (intervals, from, inschars,
                               current_buffer, inherit);
--- 1629,1635 ----
  
    /* Get the intervals for the part of the string we are inserting--
       not including the combined-before bytes.  */
!   intervals = STRING_INTERVALS (new);
    /* Insert those intervals.  */
    graft_intervals_into_buffer (intervals, from, inschars,
                               current_buffer, inherit);



reply via email to

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