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