aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa2009-02-04 01:52:39 +0000
committerKenichi Handa2009-02-04 01:52:39 +0000
commite9f91eced18281955dac85f38fb432577bd49742 (patch)
tree621f0d9a5dd7ce370dd27681c911461697551c57 /src/coding.c
parentf51994656d1f2ec148ca7cdeea86e930e51cfc29 (diff)
downloademacs-e9f91eced18281955dac85f38fb432577bd49742.tar.gz
emacs-e9f91eced18281955dac85f38fb432577bd49742.zip
(coding_system_charset_list): New function.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/coding.c b/src/coding.c
index 38cb3605464..d35ece7f273 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -5595,6 +5595,39 @@ coding_charset_list (coding)
5595} 5595}
5596 5596
5597 5597
5598/* Return a list of charsets supported by CODING-SYSTEM. */
5599
5600Lisp_Object
5601coding_system_charset_list (coding_system)
5602 Lisp_Object coding_system;
5603{
5604 int id;
5605 Lisp_Object attrs, charset_list;
5606
5607 CHECK_CODING_SYSTEM_GET_ID (coding_system, id);
5608 attrs = CODING_ID_ATTRS (id);
5609
5610 if (EQ (CODING_ATTR_TYPE (attrs), Qiso_2022))
5611 {
5612 int flags = XINT (AREF (attrs, coding_attr_iso_flags));
5613
5614 if (flags & CODING_ISO_FLAG_FULL_SUPPORT)
5615 charset_list = Viso_2022_charset_list;
5616 else
5617 charset_list = CODING_ATTR_CHARSET_LIST (attrs);
5618 }
5619 else if (EQ (CODING_ATTR_TYPE (attrs), Qemacs_mule))
5620 {
5621 charset_list = Vemacs_mule_charset_list;
5622 }
5623 else
5624 {
5625 charset_list = CODING_ATTR_CHARSET_LIST (attrs);
5626 }
5627 return charset_list;
5628}
5629
5630
5598/* Return raw-text or one of its subsidiaries that has the same 5631/* Return raw-text or one of its subsidiaries that has the same
5599 eol_type as CODING-SYSTEM. */ 5632 eol_type as CODING-SYSTEM. */
5600 5633