/[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.166 by kfstorm, Sat Feb 9 22:57:25 2002 UTC revision 1.166.2.1 by handa, Fri Mar 1 01:42:42 2002 UTC
# Line 24  Boston, MA 02111-1307, USA.  */ Line 24  Boston, MA 02111-1307, USA.  */
24  #include "lisp.h"  #include "lisp.h"
25  #include "intervals.h"  #include "intervals.h"
26  #include "buffer.h"  #include "buffer.h"
27  #include "charset.h"  #include "character.h"
28  #include "window.h"  #include "window.h"
29  #include "blockinput.h"  #include "blockinput.h"
30  #include "region-cache.h"  #include "region-cache.h"
# Line 670  copy_text (from_addr, to_addr, nbytes, Line 670  copy_text (from_addr, to_addr, nbytes,
670        int bytes_left = nbytes;        int bytes_left = nbytes;
671        Lisp_Object tbl = Qnil;        Lisp_Object tbl = Qnil;
672    
       /* We set the variable tbl to the reverse table of  
          Vnonascii_translation_table in advance.  */  
       if (CHAR_TABLE_P (Vnonascii_translation_table))  
         {  
           tbl = Fchar_table_extra_slot (Vnonascii_translation_table,  
                                         make_number (0));  
           if (!CHAR_TABLE_P (tbl))  
             tbl = Qnil;  
         }  
   
       /* Convert multibyte to single byte.  */  
673        while (bytes_left > 0)        while (bytes_left > 0)
674          {          {
675            int thislen, c;            int thislen, c;
# Line 1045  insert_1_both (string, nchars, nbytes, i Line 1034  insert_1_both (string, nchars, nbytes, i
1034    
1035    adjust_point (nchars, nbytes);    adjust_point (nchars, nbytes);
1036    
1037      CHECK_MARKERS ();
1038    }
1039    
1040    /* Insert a sequence of NCHARS chars which occupy NBYTES bytes
1041       starting at GPT_ADDR.  This funciton assumes PT == GPT.  */
1042    
1043    void
1044    insert_from_gap (nchars, nbytes)
1045         register int nchars, nbytes;
1046    {
1047      if (PT != GPT)
1048        abort ();
1049    
1050      if (NILP (current_buffer->enable_multibyte_characters))
1051        nchars = nbytes;
1052    
1053      MODIFF++;
1054    
1055      GAP_SIZE -= nbytes;
1056      GPT += nchars;
1057      ZV += nchars;
1058      Z += nchars;
1059      GPT_BYTE += nbytes;
1060      ZV_BYTE += nbytes;
1061      Z_BYTE += nbytes;
1062      if (GAP_SIZE > 0) *(GPT_ADDR) = 0; /* Put an anchor.  */
1063    
1064      if (GPT_BYTE < GPT)
1065        abort ();
1066    
1067      adjust_overlays_for_insert (PT, nchars);
1068      adjust_markers_for_insert (PT, PT_BYTE,
1069                                 PT + nchars, PT_BYTE + nbytes,
1070                                 0);
1071    
1072      if (BUF_INTERVALS (current_buffer) != 0)
1073        offset_intervals (current_buffer, PT, nchars);
1074    
1075      adjust_point (nchars, nbytes);
1076    
1077    CHECK_MARKERS ();    CHECK_MARKERS ();
1078  }  }
1079    

Legend:
Removed from v.1.166  
changed lines
  Added in v.1.166.2.1

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