diff options
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/coding.c b/src/coding.c index 86be1b4020d..b350a222a0f 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -8486,8 +8486,7 @@ usage: (define-coding-system-internal ...) */) | |||
| 8486 | make_number (nargs))); | 8486 | make_number (nargs))); |
| 8487 | } | 8487 | } |
| 8488 | 8488 | ||
| 8489 | /* Fixme: should this record the alias relationships for | 8489 | |
| 8490 | diagnostics? Should it update coding-system-list? */ | ||
| 8491 | DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias, | 8490 | DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias, |
| 8492 | Sdefine_coding_system_alias, 2, 2, 0, | 8491 | Sdefine_coding_system_alias, 2, 2, 0, |
| 8493 | doc: /* Define ALIAS as an alias for CODING-SYSTEM. */) | 8492 | doc: /* Define ALIAS as an alias for CODING-SYSTEM. */) |
| @@ -8499,6 +8498,9 @@ DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias, | |||
| 8499 | CHECK_SYMBOL (alias); | 8498 | CHECK_SYMBOL (alias); |
| 8500 | CHECK_CODING_SYSTEM_GET_SPEC (coding_system, spec); | 8499 | CHECK_CODING_SYSTEM_GET_SPEC (coding_system, spec); |
| 8501 | aliases = AREF (spec, 1); | 8500 | aliases = AREF (spec, 1); |
| 8501 | /* ALISES should be a list of length more than zero, and the first | ||
| 8502 | element is a base coding system. Append ALIAS at the tail of the | ||
| 8503 | list. */ | ||
| 8502 | while (!NILP (XCDR (aliases))) | 8504 | while (!NILP (XCDR (aliases))) |
| 8503 | aliases = XCDR (aliases); | 8505 | aliases = XCDR (aliases); |
| 8504 | XSETCDR (aliases, Fcons (alias, Qnil)); | 8506 | XSETCDR (aliases, Fcons (alias, Qnil)); |
| @@ -8513,11 +8515,10 @@ DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias, | |||
| 8513 | for (i = 0; i < 3; i++) | 8515 | for (i = 0; i < 3; i++) |
| 8514 | Fdefine_coding_system_alias (AREF (subsidiaries, i), | 8516 | Fdefine_coding_system_alias (AREF (subsidiaries, i), |
| 8515 | AREF (eol_type, i)); | 8517 | AREF (eol_type, i)); |
| 8516 | |||
| 8517 | ASET (spec, 2, subsidiaries); | ||
| 8518 | } | 8518 | } |
| 8519 | 8519 | ||
| 8520 | Fputhash (alias, spec, Vcoding_system_hash_table); | 8520 | Fputhash (alias, spec, Vcoding_system_hash_table); |
| 8521 | Vcoding_system_list = Fcons (alias, Vcoding_system_list); | ||
| 8521 | Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (alias), Qnil), | 8522 | Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (alias), Qnil), |
| 8522 | Vcoding_system_alist); | 8523 | Vcoding_system_alist); |
| 8523 | 8524 | ||