Mercurial > hg > xemacs-beta
comparison src/file-coding.c @ 5470:0af042a0c116
Merge with trunk.
author | Mats Lidell <matsl@xemacs.org> |
---|---|
date | Mon, 07 Feb 2011 21:22:17 +0100 |
parents | 8d29f1c4bb98 db326b8fe982 |
children | 4dee0387b9de |
comparison
equal
deleted
inserted
replaced
5469:2a8a04f73c15 | 5470:0af042a0c116 |
---|---|
4813 complex_vars_of_file_coding (void) | 4813 complex_vars_of_file_coding (void) |
4814 { | 4814 { |
4815 Fmake_coding_system_internal | 4815 Fmake_coding_system_internal |
4816 (Qconvert_eol_cr, Qconvert_eol, | 4816 (Qconvert_eol_cr, Qconvert_eol, |
4817 build_defer_string ("Convert CR to LF"), | 4817 build_defer_string ("Convert CR to LF"), |
4818 nconc2 (list6 (Qdocumentation, | 4818 listu (Qdocumentation, |
4819 build_defer_string ( | 4819 build_defer_string ( |
4820 "Converts CR (used to mark the end of a line on Macintosh systems) to LF\n" | 4820 "Converts CR (used to mark the end of a line on Macintosh systems) to LF\n" |
4821 "(used internally and under Unix to mark the end of a line)."), | 4821 "(used internally and under Unix to mark the end of a line)."), |
4822 Qmnemonic, build_ascstring ("CR->LF"), | 4822 Qmnemonic, build_ascstring ("CR->LF"), |
4823 Qsubtype, Qcr), | 4823 Qsubtype, Qcr, |
4824 /* VERY IMPORTANT! Tell make-coding-system not to generate | 4824 /* VERY IMPORTANT! Tell make-coding-system not to generate |
4825 subsidiaries -- it needs the coding systems we're creating | 4825 subsidiaries -- it needs the coding systems we're creating |
4826 to do so! */ | 4826 to do so! */ |
4827 list4 (Qeol_type, Qlf, | 4827 Qeol_type, Qlf, |
4828 Qsafe_charsets, Qt))); | 4828 Qsafe_charsets, Qt, |
4829 | 4829 Qunbound)); |
4830 Fmake_coding_system_internal | 4830 Fmake_coding_system_internal |
4831 (Qconvert_eol_lf, Qconvert_eol, | 4831 (Qconvert_eol_lf, Qconvert_eol, |
4832 build_defer_string ("Convert LF to LF (do nothing)"), | 4832 build_defer_string ("Convert LF to LF (do nothing)"), |
4833 nconc2 (list6 (Qdocumentation, | 4833 listu (Qdocumentation, |
4834 build_defer_string ( | 4834 build_defer_string ("Do nothing."), |
4835 "Do nothing."), | 4835 Qmnemonic, build_ascstring ("LF->LF"), |
4836 Qmnemonic, build_ascstring ("LF->LF"), | 4836 Qsubtype, Qlf, |
4837 Qsubtype, Qlf), | 4837 /* VERY IMPORTANT! Tell make-coding-system not to generate |
4838 /* VERY IMPORTANT! Tell make-coding-system not to generate | |
4839 subsidiaries -- it needs the coding systems we're creating | 4838 subsidiaries -- it needs the coding systems we're creating |
4840 to do so! */ | 4839 to do so! */ |
4841 list4 (Qeol_type, Qlf, | 4840 Qeol_type, Qlf, |
4842 Qsafe_charsets, Qt))); | 4841 Qsafe_charsets, Qt, |
4842 Qunbound)); | |
4843 | 4843 |
4844 Fmake_coding_system_internal | 4844 Fmake_coding_system_internal |
4845 (Qconvert_eol_crlf, Qconvert_eol, | 4845 (Qconvert_eol_crlf, Qconvert_eol, |
4846 build_defer_string ("Convert CRLF to LF"), | 4846 build_defer_string ("Convert CRLF to LF"), |
4847 nconc2 (list6 (Qdocumentation, | 4847 listu (Qdocumentation, |
4848 build_defer_string ( | 4848 build_defer_string ( |
4849 "Converts CR+LF (used to mark the end of a line on Macintosh systems) to LF\n" | 4849 "Converts CR+LF (used to mark the end of a line on Macintosh systems) to LF\n" |
4850 "(used internally and under Unix to mark the end of a line)."), | 4850 "(used internally and under Unix to mark the end of a line)."), |
4851 Qmnemonic, build_ascstring ("CRLF->LF"), | 4851 Qmnemonic, build_ascstring ("CRLF->LF"), |
4852 Qsubtype, Qcrlf), | 4852 Qsubtype, Qcrlf, |
4853 | 4853 /* VERY IMPORTANT! Tell make-coding-system not to generate |
4854 /* VERY IMPORTANT! Tell make-coding-system not to generate | 4854 subsidiaries -- it needs the coding systems we're creating |
4855 subsidiaries -- it needs the coding systems we're creating | 4855 to do so! */ |
4856 to do so! */ | 4856 Qeol_type, Qlf, |
4857 list4 (Qeol_type, Qlf, | 4857 Qsafe_charsets, Qt, |
4858 Qsafe_charsets, Qt))); | 4858 Qunbound)); |
4859 | 4859 |
4860 Fmake_coding_system_internal | 4860 Fmake_coding_system_internal |
4861 (Qconvert_eol_autodetect, Qconvert_eol, | 4861 (Qconvert_eol_autodetect, Qconvert_eol, |
4862 build_defer_string ("Autodetect EOL type"), | 4862 build_defer_string ("Autodetect EOL type"), |
4863 nconc2 (list6 (Qdocumentation, | 4863 listu (Qdocumentation, |
4864 build_defer_string ( | 4864 build_defer_string ("Autodetect the end-of-line type."), |
4865 "Autodetect the end-of-line type."), | 4865 Qmnemonic, build_ascstring ("Auto-EOL"), |
4866 Qmnemonic, build_ascstring ("Auto-EOL"), | 4866 Qsubtype, Qnil, |
4867 Qsubtype, Qnil), | 4867 /* VERY IMPORTANT! Tell make-coding-system not to generate |
4868 /* VERY IMPORTANT! Tell make-coding-system not to generate | 4868 subsidiaries -- it needs the coding systems we're creating |
4869 subsidiaries -- it needs the coding systems we're creating | 4869 to do so! */ |
4870 to do so! */ | 4870 Qeol_type, Qlf, |
4871 list4 (Qeol_type, Qlf, | 4871 Qsafe_charsets, Qt, |
4872 Qsafe_charsets, Qt))); | 4872 Qunbound)); |
4873 | 4873 |
4874 Fmake_coding_system_internal | 4874 Fmake_coding_system_internal |
4875 (Qundecided, Qundecided, | 4875 (Qundecided, Qundecided, |
4876 build_defer_string ("Undecided (auto-detect)"), | 4876 build_defer_string ("Undecided (auto-detect)"), |
4877 nconc2 (list4 (Qdocumentation, | 4877 listu (Qdocumentation, |
4878 build_defer_string | 4878 build_defer_string ("Automatically detects the correct encoding."), |
4879 ("Automatically detects the correct encoding."), | 4879 Qmnemonic, build_ascstring ("Auto"), |
4880 Qmnemonic, build_ascstring ("Auto")), | 4880 Qdo_eol, Qt, Qdo_coding, Qt, |
4881 list6 (Qdo_eol, Qt, Qdo_coding, Qt, | 4881 /* We do EOL detection ourselves so we don't need to be |
4882 /* We do EOL detection ourselves so we don't need to be | 4882 wrapped in an EOL detector. (It doesn't actually hurt, |
4883 wrapped in an EOL detector. (It doesn't actually hurt, | 4883 though, I don't think.) */ |
4884 though, I don't think.) */ | 4884 Qeol_type, Qlf, |
4885 Qeol_type, Qlf))); | 4885 Qunbound)); |
4886 | 4886 |
4887 Fmake_coding_system_internal | 4887 Fmake_coding_system_internal |
4888 (intern ("undecided-dos"), Qundecided, | 4888 (intern ("undecided-dos"), Qundecided, |
4889 build_defer_string ("Undecided (auto-detect) (CRLF)"), | 4889 build_defer_string ("Undecided (auto-detect) (CRLF)"), |
4890 nconc2 (list4 (Qdocumentation, | 4890 listu (Qdocumentation, |
4891 build_defer_string | 4891 build_defer_string |
4892 ("Automatically detects the correct encoding; EOL type of CRLF forced."), | 4892 ("Automatically detects the correct encoding; EOL type of CRLF forced."), |
4893 Qmnemonic, build_ascstring ("Auto")), | 4893 Qmnemonic, build_ascstring ("Auto"), |
4894 list4 (Qdo_coding, Qt, | 4894 Qdo_coding, Qt, |
4895 Qeol_type, Qcrlf))); | 4895 Qeol_type, Qcrlf, |
4896 Qunbound)); | |
4896 | 4897 |
4897 Fmake_coding_system_internal | 4898 Fmake_coding_system_internal |
4898 (intern ("undecided-unix"), Qundecided, | 4899 (intern ("undecided-unix"), Qundecided, |
4899 build_defer_string ("Undecided (auto-detect) (LF)"), | 4900 build_defer_string ("Undecided (auto-detect) (LF)"), |
4900 nconc2 (list4 (Qdocumentation, | 4901 listu (Qdocumentation, |
4901 build_defer_string | 4902 build_defer_string |
4902 ("Automatically detects the correct encoding; EOL type of LF forced."), | 4903 ("Automatically detects the correct encoding; EOL type of LF forced."), |
4903 Qmnemonic, build_ascstring ("Auto")), | 4904 Qmnemonic, build_ascstring ("Auto"), |
4904 list4 (Qdo_coding, Qt, | 4905 Qdo_coding, Qt, |
4905 Qeol_type, Qlf))); | 4906 Qeol_type, Qlf, |
4907 Qunbound));; | |
4906 | 4908 |
4907 Fmake_coding_system_internal | 4909 Fmake_coding_system_internal |
4908 (intern ("undecided-mac"), Qundecided, | 4910 (intern ("undecided-mac"), Qundecided, |
4909 build_defer_string ("Undecided (auto-detect) (CR)"), | 4911 build_defer_string ("Undecided (auto-detect) (CR)"), |
4910 nconc2 (list4 (Qdocumentation, | 4912 listu (Qdocumentation, |
4911 build_defer_string | 4913 build_defer_string |
4912 ("Automatically detects the correct encoding; EOL type of CR forced."), | 4914 ("Automatically detects the correct encoding; EOL type of CR forced."), |
4913 Qmnemonic, build_ascstring ("Auto")), | 4915 Qmnemonic, build_ascstring ("Auto"), |
4914 list4 (Qdo_coding, Qt, | 4916 Qdo_coding, Qt, |
4915 Qeol_type, Qcr))); | 4917 Qeol_type, Qcr, |
4918 Qunbound)); | |
4916 | 4919 |
4917 /* Need to create this here or we're really screwed. */ | 4920 /* Need to create this here or we're really screwed. */ |
4918 Fmake_coding_system_internal | 4921 Fmake_coding_system_internal |
4919 (Qraw_text, Qno_conversion, | 4922 (Qraw_text, Qno_conversion, |
4920 build_defer_string ("Raw Text"), | 4923 build_defer_string ("Raw Text"), |
4921 nconc2 (list4 (Qdocumentation, | 4924 listu (Qdocumentation, |
4922 build_defer_string ("Raw text converts only line-break " | 4925 build_defer_string ("Raw text converts only line-break " |
4923 "codes, and acts otherwise like " | 4926 "codes, and acts otherwise like " |
4924 "`binary'."), | 4927 "`binary'."), |
4925 Qmnemonic, build_ascstring ("Raw")), | 4928 Qmnemonic, build_ascstring ("Raw"), |
4926 #ifdef MULE | 4929 #ifdef MULE |
4927 list2 (Qsafe_charsets, list3 (Vcharset_ascii, Vcharset_control_1, | 4930 Qsafe_charsets, list3 (Vcharset_ascii, Vcharset_control_1, |
4928 Vcharset_latin_iso8859_1)))); | 4931 Vcharset_latin_iso8859_1), |
4929 | 4932 |
4930 #else | |
4931 Qnil)); | |
4932 #endif | 4933 #endif |
4934 Qunbound)); | |
4935 | |
4933 | 4936 |
4934 Fmake_coding_system_internal | 4937 Fmake_coding_system_internal |
4935 (Qbinary, Qno_conversion, | 4938 (Qbinary, Qno_conversion, |
4936 build_defer_string ("Binary"), | 4939 build_defer_string ("Binary"), |
4937 nconc2 (list6 (Qdocumentation, | 4940 listu (Qdocumentation, |
4938 build_defer_string ( | 4941 build_defer_string ( |
4939 "This coding system is as close as it comes to doing no conversion.\n" | 4942 "This coding system is as close as it comes to doing no conversion.\n" |
4940 "On input, each byte is converted directly into the character\n" | 4943 "On input, each byte is converted directly into the character\n" |
4941 "with the corresponding code -- i.e. from the `ascii', `control-1',\n" | 4944 "with the corresponding code -- i.e. from the `ascii', `control-1',\n" |
4942 "or `latin-1' character sets. On output, these characters are\n" | 4945 "or `latin-1' character sets. On output, these characters are\n" |
4943 "converted back to the corresponding bytes, and other characters\n" | 4946 "converted back to the corresponding bytes, and other characters\n" |
4944 "are converted to the default character, i.e. `~'."), | 4947 "are converted to the default character, i.e. `~'."), |
4945 Qeol_type, Qlf, | 4948 Qeol_type, Qlf, |
4946 Qmnemonic, build_ascstring ("Binary")), | 4949 Qmnemonic, build_ascstring ("Binary"), |
4947 #ifdef MULE | 4950 #ifdef MULE |
4948 list2 (Qsafe_charsets, list3 (Vcharset_ascii, Vcharset_control_1, | 4951 Qsafe_charsets, list3 (Vcharset_ascii, Vcharset_control_1, |
4949 Vcharset_latin_iso8859_1)))); | 4952 Vcharset_latin_iso8859_1), |
4950 | |
4951 #else | |
4952 Qnil)); | |
4953 #endif | 4953 #endif |
4954 Qunbound)); | |
4954 | 4955 |
4955 /* Formerly aliased to raw-text! Completely bogus and not even the same | 4956 /* Formerly aliased to raw-text! Completely bogus and not even the same |
4956 as FSF Emacs. */ | 4957 as FSF Emacs. */ |
4957 Fdefine_coding_system_alias (Qno_conversion, Qbinary); | 4958 Fdefine_coding_system_alias (Qno_conversion, Qbinary); |
4958 Fdefine_coding_system_alias (intern ("no-conversion-unix"), | 4959 Fdefine_coding_system_alias (intern ("no-conversion-unix"), |