Mercurial > hg > xemacs-beta
comparison src/file-coding.c @ 4569:80e0588fb42f
Merge.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 28 Dec 2008 14:55:02 +0000 |
parents | 726060ee587c 1d74a1d115ee |
children | e4ed58cb0e5b |
comparison
equal
deleted
inserted
replaced
4537:7ca6d57ce12d | 4569:80e0588fb42f |
---|---|
1123 else if (EQ (key, Qtranslation_table_for_decode)) | 1123 else if (EQ (key, Qtranslation_table_for_decode)) |
1124 ; | 1124 ; |
1125 else if (EQ (key, Qtranslation_table_for_encode)) | 1125 else if (EQ (key, Qtranslation_table_for_encode)) |
1126 ; | 1126 ; |
1127 else if (EQ (key, Qsafe_chars)) | 1127 else if (EQ (key, Qsafe_chars)) |
1128 ; | 1128 CODING_SYSTEM_SAFE_CHARS (cs) = value; |
1129 else if (EQ (key, Qsafe_charsets)) | 1129 else if (EQ (key, Qsafe_charsets)) |
1130 ; | 1130 CODING_SYSTEM_SAFE_CHARSETS (cs) = value; |
1131 else if (EQ (key, Qmime_charset)) | 1131 else if (EQ (key, Qmime_charset)) |
1132 ; | 1132 ; |
1133 else if (EQ (key, Qvalid_codes)) | 1133 else if (EQ (key, Qvalid_codes)) |
1134 ; | 1134 ; |
1135 else | 1135 else |
1324 table. This is not applicable to CCL-based coding systems. | 1324 table. This is not applicable to CCL-based coding systems. |
1325 | 1325 |
1326 `translation-table-for-encode' | 1326 `translation-table-for-encode' |
1327 The value is a translation table to be applied on encoding. This is | 1327 The value is a translation table to be applied on encoding. This is |
1328 not applicable to CCL-based coding systems. | 1328 not applicable to CCL-based coding systems. |
1329 | 1329 |
1330 `safe-chars' | |
1331 The value is a char table. If a character has non-nil value in it, | |
1332 the character is safely supported by the coding system. This | |
1333 overrides the specification of safe-charsets. | |
1334 | |
1335 `safe-charsets' | |
1336 The value is a list of charsets safely supported by the coding | |
1337 system. The value t means that all charsets Emacs handles are | |
1338 supported. Even if some charset is not in this list, it doesn't | |
1339 mean that the charset can't be encoded in the coding system; | |
1340 it just means that some other receiver of text encoded | |
1341 in the coding system won't be able to handle that charset. | |
1342 | |
1343 `mime-charset' | 1330 `mime-charset' |
1344 The value is a symbol of which name is `MIME-charset' parameter of | 1331 The value is a symbol of which name is `MIME-charset' parameter of |
1345 the coding system. | 1332 the coding system. |
1346 | 1333 |
1347 `valid-codes' (meaningful only for a coding system based on CCL) | 1334 `valid-codes' (meaningful only for a coding system based on CCL) |
1348 The value is a list to indicate valid byte ranges of the encoded | 1335 The value is a list to indicate valid byte ranges of the encoded |
1349 file. Each element of the list is an integer or a cons of integer. | 1336 file. Each element of the list is an integer or a cons of integer. |
1350 In the former case, the integer value is a valid byte code. In the | 1337 In the former case, the integer value is a valid byte code. In the |
1351 latter case, the integers specifies the range of valid byte codes. | 1338 latter case, the integers specifies the range of valid byte codes. |
1352 | 1339 |
1353 | 1340 The following properties are used by `default-query-coding-region', |
1341 the default implementation of `query-coding-region'. This | |
1342 implementation and these properties are not used by the Unicode coding | |
1343 systems, nor by those CCL coding systems created with | |
1344 `make-8-bit-coding-system'. | |
1345 | |
1346 `safe-chars' | |
1347 The value is a char table. If a character has non-nil value in it, | |
1348 the character is safely supported by the coding system. | |
1349 Under XEmacs, for the moment, this is used in addition to the | |
1350 `safe-charsets' property. It does not override it as it does | |
1351 under GNU Emacs. #### We need to consider if we should keep this | |
1352 behaviour. | |
1353 | |
1354 `safe-charsets' | |
1355 The value is a list of charsets safely supported by the coding | |
1356 system. For coding systems based on ISO 2022, XEmacs may try to | |
1357 encode characters outside these character sets, but outside of | |
1358 East Asia and East Asian coding systems, it is unlikely that | |
1359 consumers of the data will understand XEmacs' encoding. | |
1360 The value t means that all XEmacs character sets handles are supported. | |
1354 | 1361 |
1355 The following additional property is recognized if TYPE is `convert-eol': | 1362 The following additional property is recognized if TYPE is `convert-eol': |
1356 | 1363 |
1357 `subtype' | 1364 `subtype' |
1358 One of `lf', `crlf', `cr' or nil (for autodetection). When decoding, | 1365 One of `lf', `crlf', `cr' or nil (for autodetection). When decoding, |
1860 return XCODING_SYSTEM_EOL_CR (coding_system); | 1867 return XCODING_SYSTEM_EOL_CR (coding_system); |
1861 else if (EQ (prop, Qpost_read_conversion)) | 1868 else if (EQ (prop, Qpost_read_conversion)) |
1862 return XCODING_SYSTEM_POST_READ_CONVERSION (coding_system); | 1869 return XCODING_SYSTEM_POST_READ_CONVERSION (coding_system); |
1863 else if (EQ (prop, Qpre_write_conversion)) | 1870 else if (EQ (prop, Qpre_write_conversion)) |
1864 return XCODING_SYSTEM_PRE_WRITE_CONVERSION (coding_system); | 1871 return XCODING_SYSTEM_PRE_WRITE_CONVERSION (coding_system); |
1872 else if (EQ (prop, Qsafe_charsets)) | |
1873 return XCODING_SYSTEM_SAFE_CHARSETS (coding_system); | |
1874 else if (EQ (prop, Qsafe_chars)) | |
1875 return XCODING_SYSTEM_SAFE_CHARS (coding_system); | |
1865 else | 1876 else |
1866 { | 1877 { |
1867 Lisp_Object value = CODESYSMETH_OR_GIVEN (XCODING_SYSTEM (coding_system), | 1878 Lisp_Object value = CODESYSMETH_OR_GIVEN (XCODING_SYSTEM (coding_system), |
1868 getprop, | 1879 getprop, |
1869 (coding_system, prop), | 1880 (coding_system, prop), |