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

Diff of /emacs/src/casetab.c

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

revision 1.26.2.2 by fx, Tue Jul 16 14:56:55 2002 UTC revision 1.26.2.3 by handa, Tue Aug 20 11:23:38 2002 UTC
# Line 186  set_canon (case_table, range, elt) Line 186  set_canon (case_table, range, elt)
186    int from, to;    int from, to;
187    
188    if (NATNUMP (elt))    if (NATNUMP (elt))
189        Fset_char_table_range (canon, range, Faref (case_table, Faref (up, elt)));
190    }
191    
192    /* Set elements of char-table TABLE for characters in RANGE to
193       themselves.  This is done only when ELT is a character.  This is
194       called in map_char_table.  */
195    
196    static void
197    set_identity (table, range, elt)
198         Lisp_Object table, range, elt;
199    {
200      int from, to;
201    
202      if (NATNUMP (elt))
203      {      {
204        if (CONSP (range))        if (CONSP (range))
205          {          {
# Line 196  set_canon (case_table, range, elt) Line 210  set_canon (case_table, range, elt)
210          from = to = XINT (range);          from = to = XINT (range);
211    
212        for (; from <= to; from++)        for (; from <= to; from++)
213          {          CHAR_TABLE_SET (table, from, make_number (from));
           Lisp_Object val1, val2;  
   
           val1 = Faref (up, elt);  
           if (EQ (val1, Qt))  
             val1 = elt;  
           else if (! NATNUMP (val1))  
             continue;  
           val2 = Faref (case_table, val1);  
           if (EQ (val2, Qt))  
             val2 = val1;  
           else if (! NATNUMP (val2))  
             continue;  
           Faset (canon, make_number (from), val2);  
         }  
214      }      }
215  }  }
216    
 /* Set elements of char-table TABLE for characters in RANGE to  
    themselves.  This is done only when ELT is a character.  This is  
    called in map_char_table.  */  
   
 static void  
 set_identity (table, range, elt)  
      Lisp_Object table, range, elt;  
 {  
   if (EQ (elt, Qt) || NATNUMP (elt))  
     Fset_char_table_range (table, range, Qt);  
 }  
   
217  /* Permute the elements of TABLE (which is initially an identity  /* Permute the elements of TABLE (which is initially an identity
218     mapping) so that it has one cycle for each equivalence class     mapping) so that it has one cycle for each equivalence class
219     induced by the translation table on which map_char_table is     induced by the translation table on which map_char_table is
# Line 239  shuffle (table, range, elt) Line 227  shuffle (table, range, elt)
227    
228    if (NATNUMP (elt))    if (NATNUMP (elt))
229      {      {
230        Lisp_Object tem;        Lisp_Object tem = Faref (table, elt);
231    
232        if (CONSP (range))        if (CONSP (range))
233          {          {
# Line 252  shuffle (table, range, elt) Line 240  shuffle (table, range, elt)
240        for (; from <= to; from++)        for (; from <= to; from++)
241          if (from != XINT (elt))          if (from != XINT (elt))
242            {            {
             tem = Faref (table, elt);  
             if (EQ (tem, Qt))  
               tem = elt;  
243              Faset (table, elt, make_number (from));              Faset (table, elt, make_number (from));
244              Faset (table, make_number (from), tem);              Faset (table, make_number (from), tem);
245            }            }

Legend:
Removed from v.1.26.2.2  
changed lines
  Added in v.1.26.2.3

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