diff -r de9d8347563c -r 0edbfb71950f src/coding.c --- a/src/coding.c Sat May 16 20:13:03 2015 +0900 +++ b/src/coding.c Fri May 20 15:00:17 2016 +0900 @@ -6992,17 +6992,18 @@ /* Return a translation of character(s) at BUF according to TRANS. - TRANS is TO-CHAR or ((FROM . TO) ...) where + TRANS is TO-CHAR or [TO-CHAR ...] or ((FROM . TO) ...) where FROM = [FROM-CHAR ...], TO is TO-CHAR or [TO-CHAR ...]. - The return value is TO-CHAR or ([FROM-CHAR ...] . TO) if a - translation is found, and Qnil if not found.. - If BUF is too short to lookup characters in FROM, return Qt. */ + The return value is TO-CHAR or [TO-CHAR ...] or + ([FROM-CHAR ...] . TO) if a translation is found, and Qnil if + not found. If BUF is too short to lookup characters in FROM, + return Qt. */ static Lisp_Object get_translation (Lisp_Object trans, int *buf, int *buf_end) { - if (INTEGERP (trans)) + if (INTEGERP (trans) || VECTORP (trans)) return trans; for (; CONSP (trans); trans = XCDR (trans)) { @@ -7063,10 +7064,13 @@ trans = get_translation (trans, buf, buf_end); if (INTEGERP (trans)) c = XINT (trans); - else if (CONSP (trans)) + else if (CONSP (trans) || VECTORP (trans)) { - from_nchars = ASIZE (XCAR (trans)); - trans = XCDR (trans); + if (CONSP (trans)) + { + from_nchars = ASIZE (XCAR (trans)); + trans = XCDR (trans); + } if (INTEGERP (trans)) c = XINT (trans); else @@ -7708,10 +7712,13 @@ trans = get_translation (trans, lookup_buf, lookup_buf_end); if (INTEGERP (trans)) c = XINT (trans); - else if (CONSP (trans)) - { - from_nchars = ASIZE (XCAR (trans)); - trans = XCDR (trans); + else if (CONSP (trans) || VECTORP (trans)) + { + if (CONSP (trans)) + { + from_nchars = ASIZE (XCAR (trans)); + trans = XCDR (trans); + } if (INTEGERP (trans)) c = XINT (trans); else