diff options
| author | Kenichi Handa | 2006-02-03 07:37:09 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-02-03 07:37:09 +0000 |
| commit | 583f71ca0623ebb104d7afa7021a57d57a6de6f4 (patch) | |
| tree | e886279250b94180f242b6a7a84d2f3dbab87d47 /src/coding.c | |
| parent | 06eb776d8e80eaed0f6b04349dbd4df9292131d9 (diff) | |
| download | emacs-583f71ca0623ebb104d7afa7021a57d57a6de6f4.tar.gz emacs-583f71ca0623ebb104d7afa7021a57d57a6de6f4.zip | |
(Fdefine_coding_system_internal): Avoid a duplicated
element in Vcoding_system_alist.
(Fdefine_coding_system_alias): Likewise.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/coding.c b/src/coding.c index a5625339a29..6ec0804353f 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -8933,8 +8933,11 @@ usage: (define-coding-system-internal ...) */) | |||
| 8933 | ASET (this_spec, 2, this_eol_type); | 8933 | ASET (this_spec, 2, this_eol_type); |
| 8934 | Fputhash (this_name, this_spec, Vcoding_system_hash_table); | 8934 | Fputhash (this_name, this_spec, Vcoding_system_hash_table); |
| 8935 | Vcoding_system_list = Fcons (this_name, Vcoding_system_list); | 8935 | Vcoding_system_list = Fcons (this_name, Vcoding_system_list); |
| 8936 | Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (this_name), Qnil), | 8936 | val = Fassoc (Fsymbol_name (this_name), Vcoding_system_alist); |
| 8937 | Vcoding_system_alist); | 8937 | if (NILP (val)) |
| 8938 | Vcoding_system_alist | ||
| 8939 | = Fcons (Fcons (Fsymbol_name (this_name), Qnil), | ||
| 8940 | Vcoding_system_alist); | ||
| 8938 | } | 8941 | } |
| 8939 | } | 8942 | } |
| 8940 | 8943 | ||
| @@ -8944,8 +8947,10 @@ usage: (define-coding-system-internal ...) */) | |||
| 8944 | 8947 | ||
| 8945 | Fputhash (name, spec_vec, Vcoding_system_hash_table); | 8948 | Fputhash (name, spec_vec, Vcoding_system_hash_table); |
| 8946 | Vcoding_system_list = Fcons (name, Vcoding_system_list); | 8949 | Vcoding_system_list = Fcons (name, Vcoding_system_list); |
| 8947 | Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (name), Qnil), | 8950 | val = Fassoc (Fsymbol_name (name), Vcoding_system_alist); |
| 8948 | Vcoding_system_alist); | 8951 | if (NILP (val)) |
| 8952 | Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (name), Qnil), | ||
| 8953 | Vcoding_system_alist); | ||
| 8949 | 8954 | ||
| 8950 | { | 8955 | { |
| 8951 | int id = coding_categories[category].id; | 8956 | int id = coding_categories[category].id; |
| @@ -9026,7 +9031,7 @@ DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias, | |||
| 9026 | (alias, coding_system) | 9031 | (alias, coding_system) |
| 9027 | Lisp_Object alias, coding_system; | 9032 | Lisp_Object alias, coding_system; |
| 9028 | { | 9033 | { |
| 9029 | Lisp_Object spec, aliases, eol_type; | 9034 | Lisp_Object spec, aliases, eol_type, val; |
| 9030 | 9035 | ||
| 9031 | CHECK_SYMBOL (alias); | 9036 | CHECK_SYMBOL (alias); |
| 9032 | CHECK_CODING_SYSTEM_GET_SPEC (coding_system, spec); | 9037 | CHECK_CODING_SYSTEM_GET_SPEC (coding_system, spec); |
| @@ -9052,8 +9057,10 @@ DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias, | |||
| 9052 | 9057 | ||
| 9053 | Fputhash (alias, spec, Vcoding_system_hash_table); | 9058 | Fputhash (alias, spec, Vcoding_system_hash_table); |
| 9054 | Vcoding_system_list = Fcons (alias, Vcoding_system_list); | 9059 | Vcoding_system_list = Fcons (alias, Vcoding_system_list); |
| 9055 | Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (alias), Qnil), | 9060 | val = Fassoc (Fsymbol_name (alias), Vcoding_system_alist); |
| 9056 | Vcoding_system_alist); | 9061 | if (NILP (val)) |
| 9062 | Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (alias), Qnil), | ||
| 9063 | Vcoding_system_alist); | ||
| 9057 | 9064 | ||
| 9058 | return Qnil; | 9065 | return Qnil; |
| 9059 | } | 9066 | } |