7763 |
DEFUN ("set-coding-system-priority", Fset_coding_system_priority, |
DEFUN ("set-coding-system-priority", Fset_coding_system_priority, |
7764 |
Sset_coding_system_priority, 0, MANY, 0, |
Sset_coding_system_priority, 0, MANY, 0, |
7765 |
doc: /* Assign higher priority to the coding systems given as arguments. |
doc: /* Assign higher priority to the coding systems given as arguments. |
7766 |
usage: (set-coding-system-priority CODING-SYSTEM ...) */) |
If multiple coding systems belongs to the same category, |
7767 |
|
all but the first one are ignored. */) |
7768 |
(nargs, args) |
(nargs, args) |
7769 |
int nargs; |
int nargs; |
7770 |
Lisp_Object *args; |
Lisp_Object *args; |
7792 |
if (coding_categories[category].id >= 0 |
if (coding_categories[category].id >= 0 |
7793 |
&& ! EQ (args[i], CODING_ID_NAME (coding_categories[category].id))) |
&& ! EQ (args[i], CODING_ID_NAME (coding_categories[category].id))) |
7794 |
setup_coding_system (args[i], &coding_categories[category]); |
setup_coding_system (args[i], &coding_categories[category]); |
7795 |
|
Fset (AREF (Vcoding_category_table, category), args[i]); |
7796 |
} |
} |
7797 |
|
|
7798 |
/* Now we have decided top J priorities. Reflect the order of the |
/* Now we have decided top J priorities. Reflect the order of the |
7809 |
} |
} |
7810 |
|
|
7811 |
bcopy (priorities, coding_priorities, sizeof priorities); |
bcopy (priorities, coding_priorities, sizeof priorities); |
7812 |
|
|
7813 |
|
/* Update `coding-category-list'. */ |
7814 |
|
Vcoding_category_list = Qnil; |
7815 |
|
for (i = coding_category_max - 1; i >= 0; i--) |
7816 |
|
Vcoding_category_list |
7817 |
|
= Fcons (AREF (Vcoding_category_table, priorities[i]), |
7818 |
|
Vcoding_category_list); |
7819 |
|
|
7820 |
return Qnil; |
return Qnil; |
7821 |
} |
} |
7822 |
|
|
8643 |
intern ("coding-category-utf-8")); |
intern ("coding-category-utf-8")); |
8644 |
ASET (Vcoding_category_table, coding_category_utf_16_be, |
ASET (Vcoding_category_table, coding_category_utf_16_be, |
8645 |
intern ("coding-category-utf-16-be")); |
intern ("coding-category-utf-16-be")); |
8646 |
|
ASET (Vcoding_category_table, coding_category_utf_16_auto, |
8647 |
|
intern ("coding-category-utf-16-auto")); |
8648 |
ASET (Vcoding_category_table, coding_category_utf_16_le, |
ASET (Vcoding_category_table, coding_category_utf_16_le, |
8649 |
intern ("coding-category-utf-16-le")); |
intern ("coding-category-utf-16-le")); |
8650 |
ASET (Vcoding_category_table, coding_category_utf_16_be_nosig, |
ASET (Vcoding_category_table, coding_category_utf_16_be_nosig, |
8966 |
setup_coding_system (Qno_conversion, &keyboard_coding); |
setup_coding_system (Qno_conversion, &keyboard_coding); |
8967 |
setup_coding_system (Qno_conversion, &terminal_coding); |
setup_coding_system (Qno_conversion, &terminal_coding); |
8968 |
setup_coding_system (Qno_conversion, &safe_terminal_coding); |
setup_coding_system (Qno_conversion, &safe_terminal_coding); |
8969 |
|
|
8970 |
|
{ |
8971 |
|
int i; |
8972 |
|
|
8973 |
|
for (i = 0; i < coding_category_max; i++) |
8974 |
|
Fset (AREF (Vcoding_category_table, i), Qno_conversion); |
8975 |
|
} |
8976 |
} |
} |
8977 |
|
|
8978 |
char * |
char * |