emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/src/coding.c
Date: Wed, 29 Sep 2004 19:47:01 -0400

Index: emacs/src/coding.c
diff -c emacs/src/coding.c:1.306 emacs/src/coding.c:1.307
*** emacs/src/coding.c:1.306    Tue Aug  3 05:12:00 2004
--- emacs/src/coding.c  Wed Sep 29 23:40:30 2004
***************
*** 5650,5657 ****
        coding_allocate_composition_data (coding, from);
      }
  
!   /* Try to skip the heading and tailing ASCIIs.  */
!   if (coding->type != coding_type_ccl)
      {
        int from_byte_orig = from_byte, to_byte_orig = to_byte;
  
--- 5650,5660 ----
        coding_allocate_composition_data (coding, from);
      }
  
!   /* Try to skip the heading and tailing ASCIIs.  We can't skip them
!      if we must run CCL program or there are compositions to
!      encode.  */
!   if (coding->type != coding_type_ccl
!       && (! coding->cmp_data || coding->cmp_data->used == 0))
      {
        int from_byte_orig = from_byte, to_byte_orig = to_byte;
  
***************
*** 5667,5672 ****
--- 5670,5676 ----
          if (!replace)
            /* We must record and adjust for this new text now.  */
            adjust_after_insert (from, from_byte_orig, to, to_byte_orig, len);
+         coding_free_composition_data (coding);
          return 0;
        }
  
***************
*** 6297,6309 ****
    if (coding->composing != COMPOSITION_DISABLED)
      coding_save_composition (coding, from, to, str);
  
!   /* Try to skip the heading and tailing ASCIIs.  */
!   if (coding->type != coding_type_ccl)
      {
        SHRINK_CONVERSION_REGION (&from, &to_byte, coding, SDATA (str),
                                1);
        if (from == to_byte)
!       return (nocopy ? str : Fcopy_sequence (str));
        shrinked_bytes = from + (SBYTES (str) - to_byte);
      }
  
--- 6301,6319 ----
    if (coding->composing != COMPOSITION_DISABLED)
      coding_save_composition (coding, from, to, str);
  
!   /* Try to skip the heading and tailing ASCIIs.  We can't skip them
!      if we must run CCL program or there are compositions to
!      encode.  */
!   if (coding->type != coding_type_ccl
!       && (! coding->cmp_data || coding->cmp_data->used == 0))
      {
        SHRINK_CONVERSION_REGION (&from, &to_byte, coding, SDATA (str),
                                1);
        if (from == to_byte)
!       {
!         coding_free_composition_data (coding);
!         return (nocopy ? str : Fcopy_sequence (str));
!       }
        shrinked_bytes = from + (SBYTES (str) - to_byte);
      }
  




reply via email to

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