aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/coding.c b/src/coding.c
index 19d9ebfc68c..9b295d7d870 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -7835,6 +7835,7 @@ usage: (define-coding-system-internal ...) */)
7835 7835
7836 if (EQ (coding_type, Qcharset)) 7836 if (EQ (coding_type, Qcharset))
7837 { 7837 {
7838 Lisp_Object list;
7838 /* Generate a lisp vector of 256 elements. Each element is nil, 7839 /* Generate a lisp vector of 256 elements. Each element is nil,
7839 integer, or a list of charset IDs. 7840 integer, or a list of charset IDs.
7840 7841
@@ -7848,9 +7849,23 @@ usage: (define-coding-system-internal ...) */)
7848 of one of them. The list is sorted by dimensions of the 7849 of one of them. The list is sorted by dimensions of the
7849 charsets. A charset of smaller dimension comes firtst. 7850 charsets. A charset of smaller dimension comes firtst.
7850 */ 7851 */
7852 for (list = Qnil, tail = charset_list; CONSP (tail); tail = XCDR (tail))
7853 {
7854 struct charset *charset = CHARSET_FROM_ID (XFASTINT (XCAR (tail)));
7855
7856 if (charset->method == CHARSET_METHOD_SUPERSET)
7857 {
7858 val = CHARSET_SUPERSET (charset);
7859 for (; CONSP (val); val = XCDR (val))
7860 list = Fcons (XCAR (XCAR (val)), list);
7861 }
7862 else
7863 list = Fcons (XCAR (tail), list);
7864 }
7865
7851 val = Fmake_vector (make_number (256), Qnil); 7866 val = Fmake_vector (make_number (256), Qnil);
7852 7867
7853 for (tail = charset_list; CONSP (tail); tail = XCDR (tail)) 7868 for (tail = Fnreverse (list); CONSP (tail); tail = XCDR (tail))
7854 { 7869 {
7855 struct charset *charset = CHARSET_FROM_ID (XFASTINT (XCAR (tail))); 7870 struct charset *charset = CHARSET_FROM_ID (XFASTINT (XCAR (tail)));
7856 int dim = CHARSET_DIMENSION (charset); 7871 int dim = CHARSET_DIMENSION (charset);