642 |
} |
} |
643 |
|
|
644 |
/* Look up the element in TABLE at index CH, and return it as an |
/* Look up the element in TABLE at index CH, and return it as an |
645 |
integer. If the element is nil, return CH itself. (Actually we do |
integer. If the element is not a character, return CH itself. */ |
|
that for any non-integer.) */ |
|
646 |
|
|
647 |
int |
int |
648 |
char_table_translate (table, ch) |
char_table_translate (table, ch) |
651 |
{ |
{ |
652 |
Lisp_Object value; |
Lisp_Object value; |
653 |
value = Faref (table, make_number (ch)); |
value = Faref (table, make_number (ch)); |
654 |
if (! INTEGERP (value)) /* fixme: use CHARACTERP? */ |
if (! CHARACTERP (value)) |
655 |
return ch; |
return ch; |
656 |
return XINT (value); |
return XINT (value); |
657 |
} |
} |