comparison src/chartab.c @ 91036:f5e7e4e0fa66

(map_sub_char_table): If the range contains just one character, call the function with that character even if the depth is not 3. (map_char_table): Likewise.
author Kenichi Handa <handa@m17n.org>
date Thu, 20 Sep 2007 07:49:52 +0000
parents d563fa5ce200
children 35069180a991
comparison
equal deleted inserted replaced
91035:eec5de3521b8 91036:f5e7e4e0fa66
803 } 803 }
804 } 804 }
805 if (! NILP (val) && different_value) 805 if (! NILP (val) && different_value)
806 { 806 {
807 XSETCDR (range, make_number (c - 1)); 807 XSETCDR (range, make_number (c - 1));
808 if (depth == 3 808 if (EQ (XCAR (range), XCDR (range)))
809 && EQ (XCAR (range), XCDR (range)))
810 { 809 {
811 if (c_function) 810 if (c_function)
812 (*c_function) (arg, XCAR (range), val); 811 (*c_function) (arg, XCAR (range), val);
813 else 812 else
814 call2 (function, XCAR (range), val); 813 call2 (function, XCAR (range), val);
873 table = parent; 872 table = parent;
874 } 873 }
875 874
876 if (! NILP (val)) 875 if (! NILP (val))
877 { 876 {
878 if (c_function) 877 if (EQ (XCAR (range), XCDR (range)))
879 (*c_function) (arg, range, val); 878 {
879 if (c_function)
880 (*c_function) (arg, XCAR (range), val);
881 else
882 call2 (function, XCAR (range), val);
883 }
880 else 884 else
881 call2 (function, range, val); 885 {
886 if (c_function)
887 (*c_function) (arg, range, val);
888 else
889 call2 (function, range, val);
890 }
882 } 891 }
883 892
884 UNGCPRO; 893 UNGCPRO;
885 } 894 }
886 895