aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa2012-08-16 21:25:17 +0900
committerKenichi Handa2012-08-16 21:25:17 +0900
commitd75ffb4ed0b2e72a9361a07d16a5c884a9459728 (patch)
tree8ac5a6a8ae033fef7fbc7fb7b09a703ef4b0ed5b /src/coding.c
parent69c41c4070c86baac11a627e9c3d366420aeb7cc (diff)
parent250c8ab9b8f6322959fa3122db83944c30c3894b (diff)
downloademacs-d75ffb4ed0b2e72a9361a07d16a5c884a9459728.tar.gz
emacs-d75ffb4ed0b2e72a9361a07d16a5c884a9459728.zip
merge trunk
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c121
1 files changed, 64 insertions, 57 deletions
diff --git a/src/coding.c b/src/coding.c
index d9fcc634b77..c601a18b26e 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -2674,8 +2674,8 @@ encode_coding_emacs_mule (struct coding_system *coding)
2674 CODING_GET_INFO (coding, attrs, charset_list); 2674 CODING_GET_INFO (coding, attrs, charset_list);
2675 if (! EQ (charset_list, Vemacs_mule_charset_list)) 2675 if (! EQ (charset_list, Vemacs_mule_charset_list))
2676 { 2676 {
2677 CODING_ATTR_CHARSET_LIST (attrs) 2677 charset_list = Vemacs_mule_charset_list;
2678 = charset_list = Vemacs_mule_charset_list; 2678 ASET (attrs, coding_attr_charset_list, charset_list);
2679 } 2679 }
2680 2680
2681 while (charbuf < charbuf_end) 2681 while (charbuf < charbuf_end)
@@ -2967,8 +2967,8 @@ setup_iso_safe_charsets (Lisp_Object attrs)
2967 if ((flags & CODING_ISO_FLAG_FULL_SUPPORT) 2967 if ((flags & CODING_ISO_FLAG_FULL_SUPPORT)
2968 && ! EQ (charset_list, Viso_2022_charset_list)) 2968 && ! EQ (charset_list, Viso_2022_charset_list))
2969 { 2969 {
2970 CODING_ATTR_CHARSET_LIST (attrs) 2970 charset_list = Viso_2022_charset_list;
2971 = charset_list = Viso_2022_charset_list; 2971 ASET (attrs, coding_attr_charset_list, charset_list);
2972 ASET (attrs, coding_attr_safe_charsets, Qnil); 2972 ASET (attrs, coding_attr_safe_charsets, Qnil);
2973 } 2973 }
2974 2974
@@ -7102,8 +7102,17 @@ decode_coding (struct coding_system *coding)
7102 set_buffer_internal (XBUFFER (coding->dst_object)); 7102 set_buffer_internal (XBUFFER (coding->dst_object));
7103 if (GPT != PT) 7103 if (GPT != PT)
7104 move_gap_both (PT, PT_BYTE); 7104 move_gap_both (PT, PT_BYTE);
7105
7106 /* We must disable undo_list in order to record the whole insert
7107 transaction via record_insert at the end. But doing so also
7108 disables the recording of the first change to the undo_list.
7109 Therefore we check for first change here and record it via
7110 record_first_change if needed. */
7111 if (MODIFF <= SAVE_MODIFF)
7112 record_first_change ();
7113
7105 undo_list = BVAR (current_buffer, undo_list); 7114 undo_list = BVAR (current_buffer, undo_list);
7106 BVAR (current_buffer, undo_list) = Qt; 7115 BSET (current_buffer, undo_list, Qt);
7107 } 7116 }
7108 7117
7109 coding->consumed = coding->consumed_char = 0; 7118 coding->consumed = coding->consumed_char = 0;
@@ -7200,7 +7209,7 @@ decode_coding (struct coding_system *coding)
7200 decode_eol (coding); 7209 decode_eol (coding);
7201 if (BUFFERP (coding->dst_object)) 7210 if (BUFFERP (coding->dst_object))
7202 { 7211 {
7203 BVAR (current_buffer, undo_list) = undo_list; 7212 BSET (current_buffer, undo_list, undo_list);
7204 record_insert (coding->dst_pos, coding->produced_char); 7213 record_insert (coding->dst_pos, coding->produced_char);
7205 } 7214 }
7206 return coding->result; 7215 return coding->result;
@@ -7568,8 +7577,8 @@ make_conversion_work_buffer (int multibyte)
7568 doesn't compile new regexps. */ 7577 doesn't compile new regexps. */
7569 Fset (Fmake_local_variable (Qinhibit_modification_hooks), Qt); 7578 Fset (Fmake_local_variable (Qinhibit_modification_hooks), Qt);
7570 Ferase_buffer (); 7579 Ferase_buffer ();
7571 BVAR (current_buffer, undo_list) = Qt; 7580 BSET (current_buffer, undo_list, Qt);
7572 BVAR (current_buffer, enable_multibyte_characters) = multibyte ? Qt : Qnil; 7581 BSET (current_buffer, enable_multibyte_characters, multibyte ? Qt : Qnil);
7573 set_buffer_internal (current); 7582 set_buffer_internal (current);
7574 return workbuf; 7583 return workbuf;
7575} 7584}
@@ -7588,7 +7597,7 @@ code_conversion_restore (Lisp_Object arg)
7588 { 7597 {
7589 if (EQ (workbuf, Vcode_conversion_reused_workbuf)) 7598 if (EQ (workbuf, Vcode_conversion_reused_workbuf))
7590 reused_workbuf_in_use = 0; 7599 reused_workbuf_in_use = 0;
7591 else if (! NILP (Fbuffer_live_p (workbuf))) 7600 else
7592 Fkill_buffer (workbuf); 7601 Fkill_buffer (workbuf);
7593 } 7602 }
7594 set_buffer_internal (XBUFFER (current)); 7603 set_buffer_internal (XBUFFER (current));
@@ -7931,15 +7940,12 @@ encode_coding_object (struct coding_system *coding,
7931 } 7940 }
7932 7941
7933 { 7942 {
7934 Lisp_Object args[3];
7935 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; 7943 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
7936 7944
7937 GCPRO5 (coding->src_object, coding->dst_object, src_object, dst_object, 7945 GCPRO5 (coding->src_object, coding->dst_object, src_object, dst_object,
7938 old_deactivate_mark); 7946 old_deactivate_mark);
7939 args[0] = CODING_ATTR_PRE_WRITE (attrs); 7947 safe_call2 (CODING_ATTR_PRE_WRITE (attrs),
7940 args[1] = make_number (BEG); 7948 make_number (BEG), make_number (Z));
7941 args[2] = make_number (Z);
7942 safe_call (3, args);
7943 UNGCPRO; 7949 UNGCPRO;
7944 } 7950 }
7945 if (XBUFFER (coding->src_object) != current_buffer) 7951 if (XBUFFER (coding->src_object) != current_buffer)
@@ -9297,9 +9303,9 @@ DEFUN ("set-terminal-coding-system-internal", Fset_terminal_coding_system_intern
9297 terminal_coding->src_multibyte = 1; 9303 terminal_coding->src_multibyte = 1;
9298 terminal_coding->dst_multibyte = 0; 9304 terminal_coding->dst_multibyte = 0;
9299 if (terminal_coding->common_flags & CODING_REQUIRE_ENCODING_MASK) 9305 if (terminal_coding->common_flags & CODING_REQUIRE_ENCODING_MASK)
9300 term->charset_list = coding_charset_list (terminal_coding); 9306 TSET (term, charset_list, coding_charset_list (terminal_coding));
9301 else 9307 else
9302 term->charset_list = Fcons (make_number (charset_ascii), Qnil); 9308 TSET (term, charset_list, Fcons (make_number (charset_ascii), Qnil));
9303 return Qnil; 9309 return Qnil;
9304} 9310}
9305 9311
@@ -9606,16 +9612,16 @@ usage: (define-coding-system-internal ...) */)
9606 9612
9607 name = args[coding_arg_name]; 9613 name = args[coding_arg_name];
9608 CHECK_SYMBOL (name); 9614 CHECK_SYMBOL (name);
9609 CODING_ATTR_BASE_NAME (attrs) = name; 9615 ASET (attrs, coding_attr_base_name, name);
9610 9616
9611 val = args[coding_arg_mnemonic]; 9617 val = args[coding_arg_mnemonic];
9612 if (! STRINGP (val)) 9618 if (! STRINGP (val))
9613 CHECK_CHARACTER (val); 9619 CHECK_CHARACTER (val);
9614 CODING_ATTR_MNEMONIC (attrs) = val; 9620 ASET (attrs, coding_attr_mnemonic, val);
9615 9621
9616 coding_type = args[coding_arg_coding_type]; 9622 coding_type = args[coding_arg_coding_type];
9617 CHECK_SYMBOL (coding_type); 9623 CHECK_SYMBOL (coding_type);
9618 CODING_ATTR_TYPE (attrs) = coding_type; 9624 ASET (attrs, coding_attr_type, coding_type);
9619 9625
9620 charset_list = args[coding_arg_charset_list]; 9626 charset_list = args[coding_arg_charset_list];
9621 if (SYMBOLP (charset_list)) 9627 if (SYMBOLP (charset_list))
@@ -9662,49 +9668,49 @@ usage: (define-coding-system-internal ...) */)
9662 max_charset_id = charset->id; 9668 max_charset_id = charset->id;
9663 } 9669 }
9664 } 9670 }
9665 CODING_ATTR_CHARSET_LIST (attrs) = charset_list; 9671 ASET (attrs, coding_attr_charset_list, charset_list);
9666 9672
9667 safe_charsets = make_uninit_string (max_charset_id + 1); 9673 safe_charsets = make_uninit_string (max_charset_id + 1);
9668 memset (SDATA (safe_charsets), 255, max_charset_id + 1); 9674 memset (SDATA (safe_charsets), 255, max_charset_id + 1);
9669 for (tail = charset_list; CONSP (tail); tail = XCDR (tail)) 9675 for (tail = charset_list; CONSP (tail); tail = XCDR (tail))
9670 SSET (safe_charsets, XFASTINT (XCAR (tail)), 0); 9676 SSET (safe_charsets, XFASTINT (XCAR (tail)), 0);
9671 CODING_ATTR_SAFE_CHARSETS (attrs) = safe_charsets; 9677 ASET (attrs, coding_attr_safe_charsets, safe_charsets);
9672 9678
9673 CODING_ATTR_ASCII_COMPAT (attrs) = args[coding_arg_ascii_compatible_p]; 9679 ASET (attrs, coding_attr_ascii_compat, args[coding_arg_ascii_compatible_p]);
9674 9680
9675 val = args[coding_arg_decode_translation_table]; 9681 val = args[coding_arg_decode_translation_table];
9676 if (! CHAR_TABLE_P (val) && ! CONSP (val)) 9682 if (! CHAR_TABLE_P (val) && ! CONSP (val))
9677 CHECK_SYMBOL (val); 9683 CHECK_SYMBOL (val);
9678 CODING_ATTR_DECODE_TBL (attrs) = val; 9684 ASET (attrs, coding_attr_decode_tbl, val);
9679 9685
9680 val = args[coding_arg_encode_translation_table]; 9686 val = args[coding_arg_encode_translation_table];
9681 if (! CHAR_TABLE_P (val) && ! CONSP (val)) 9687 if (! CHAR_TABLE_P (val) && ! CONSP (val))
9682 CHECK_SYMBOL (val); 9688 CHECK_SYMBOL (val);
9683 CODING_ATTR_ENCODE_TBL (attrs) = val; 9689 ASET (attrs, coding_attr_encode_tbl, val);
9684 9690
9685 val = args[coding_arg_post_read_conversion]; 9691 val = args[coding_arg_post_read_conversion];
9686 CHECK_SYMBOL (val); 9692 CHECK_SYMBOL (val);
9687 CODING_ATTR_POST_READ (attrs) = val; 9693 ASET (attrs, coding_attr_post_read, val);
9688 9694
9689 val = args[coding_arg_pre_write_conversion]; 9695 val = args[coding_arg_pre_write_conversion];
9690 CHECK_SYMBOL (val); 9696 CHECK_SYMBOL (val);
9691 CODING_ATTR_PRE_WRITE (attrs) = val; 9697 ASET (attrs, coding_attr_pre_write, val);
9692 9698
9693 val = args[coding_arg_default_char]; 9699 val = args[coding_arg_default_char];
9694 if (NILP (val)) 9700 if (NILP (val))
9695 CODING_ATTR_DEFAULT_CHAR (attrs) = make_number (' '); 9701 ASET (attrs, coding_attr_default_char, make_number (' '));
9696 else 9702 else
9697 { 9703 {
9698 CHECK_CHARACTER (val); 9704 CHECK_CHARACTER (val);
9699 CODING_ATTR_DEFAULT_CHAR (attrs) = val; 9705 ASET (attrs, coding_attr_default_char, val);
9700 } 9706 }
9701 9707
9702 val = args[coding_arg_for_unibyte]; 9708 val = args[coding_arg_for_unibyte];
9703 CODING_ATTR_FOR_UNIBYTE (attrs) = NILP (val) ? Qnil : Qt; 9709 ASET (attrs, coding_attr_for_unibyte, NILP (val) ? Qnil : Qt);
9704 9710
9705 val = args[coding_arg_plist]; 9711 val = args[coding_arg_plist];
9706 CHECK_LIST (val); 9712 CHECK_LIST (val);
9707 CODING_ATTR_PLIST (attrs) = val; 9713 ASET (attrs, coding_attr_plist, val);
9708 9714
9709 if (EQ (coding_type, Qcharset)) 9715 if (EQ (coding_type, Qcharset))
9710 { 9716 {
@@ -9729,7 +9735,7 @@ usage: (define-coding-system-internal ...) */)
9729 int idx = (dim - 1) * 4; 9735 int idx = (dim - 1) * 4;
9730 9736
9731 if (CHARSET_ASCII_COMPATIBLE_P (charset)) 9737 if (CHARSET_ASCII_COMPATIBLE_P (charset))
9732 CODING_ATTR_ASCII_COMPAT (attrs) = Qt; 9738 ASET (attrs, coding_attr_ascii_compat, Qt);
9733 9739
9734 for (i = charset->code_space[idx]; 9740 for (i = charset->code_space[idx];
9735 i <= charset->code_space[idx + 1]; i++) 9741 i <= charset->code_space[idx + 1]; i++)
@@ -9827,7 +9833,7 @@ usage: (define-coding-system-internal ...) */)
9827 { 9833 {
9828 Lisp_Object bom, endian; 9834 Lisp_Object bom, endian;
9829 9835
9830 CODING_ATTR_ASCII_COMPAT (attrs) = Qnil; 9836 ASET (attrs, coding_attr_ascii_compat, Qnil);
9831 9837
9832 if (nargs < coding_arg_utf16_max) 9838 if (nargs < coding_arg_utf16_max)
9833 goto short_args; 9839 goto short_args;
@@ -9880,7 +9886,7 @@ usage: (define-coding-system-internal ...) */)
9880 CHECK_CHARSET_GET_CHARSET (val, charset); 9886 CHECK_CHARSET_GET_CHARSET (val, charset);
9881 ASET (initial, i, make_number (CHARSET_ID (charset))); 9887 ASET (initial, i, make_number (CHARSET_ID (charset)));
9882 if (i == 0 && CHARSET_ASCII_COMPATIBLE_P (charset)) 9888 if (i == 0 && CHARSET_ASCII_COMPATIBLE_P (charset))
9883 CODING_ATTR_ASCII_COMPAT (attrs) = Qt; 9889 ASET (attrs, coding_attr_ascii_compat, Qt);
9884 } 9890 }
9885 else 9891 else
9886 ASET (initial, i, make_number (-1)); 9892 ASET (initial, i, make_number (-1));
@@ -9941,13 +9947,13 @@ usage: (define-coding-system-internal ...) */)
9941 } 9947 }
9942 if (category != coding_category_iso_8_1 9948 if (category != coding_category_iso_8_1
9943 && category != coding_category_iso_8_2) 9949 && category != coding_category_iso_8_2)
9944 CODING_ATTR_ASCII_COMPAT (attrs) = Qnil; 9950 ASET (attrs, coding_attr_ascii_compat, Qnil);
9945 } 9951 }
9946 else if (EQ (coding_type, Qemacs_mule)) 9952 else if (EQ (coding_type, Qemacs_mule))
9947 { 9953 {
9948 if (EQ (args[coding_arg_charset_list], Qemacs_mule)) 9954 if (EQ (args[coding_arg_charset_list], Qemacs_mule))
9949 ASET (attrs, coding_attr_emacs_mule_full, Qt); 9955 ASET (attrs, coding_attr_emacs_mule_full, Qt);
9950 CODING_ATTR_ASCII_COMPAT (attrs) = Qt; 9956 ASET (attrs, coding_attr_ascii_compat, Qt);
9951 category = coding_category_emacs_mule; 9957 category = coding_category_emacs_mule;
9952 } 9958 }
9953 else if (EQ (coding_type, Qshift_jis)) 9959 else if (EQ (coding_type, Qshift_jis))
@@ -9964,7 +9970,7 @@ usage: (define-coding-system-internal ...) */)
9964 error ("Dimension of charset %s is not one", 9970 error ("Dimension of charset %s is not one",
9965 SDATA (SYMBOL_NAME (CHARSET_NAME (charset)))); 9971 SDATA (SYMBOL_NAME (CHARSET_NAME (charset))));
9966 if (CHARSET_ASCII_COMPATIBLE_P (charset)) 9972 if (CHARSET_ASCII_COMPATIBLE_P (charset))
9967 CODING_ATTR_ASCII_COMPAT (attrs) = Qt; 9973 ASET (attrs, coding_attr_ascii_compat, Qt);
9968 9974
9969 charset_list = XCDR (charset_list); 9975 charset_list = XCDR (charset_list);
9970 charset = CHARSET_FROM_ID (XINT (XCAR (charset_list))); 9976 charset = CHARSET_FROM_ID (XINT (XCAR (charset_list)));
@@ -10002,7 +10008,7 @@ usage: (define-coding-system-internal ...) */)
10002 error ("Dimension of charset %s is not one", 10008 error ("Dimension of charset %s is not one",
10003 SDATA (SYMBOL_NAME (CHARSET_NAME (charset)))); 10009 SDATA (SYMBOL_NAME (CHARSET_NAME (charset))));
10004 if (CHARSET_ASCII_COMPATIBLE_P (charset)) 10010 if (CHARSET_ASCII_COMPATIBLE_P (charset))
10005 CODING_ATTR_ASCII_COMPAT (attrs) = Qt; 10011 ASET (attrs, coding_attr_ascii_compat, Qt);
10006 10012
10007 charset_list = XCDR (charset_list); 10013 charset_list = XCDR (charset_list);
10008 charset = CHARSET_FROM_ID (XINT (XCAR (charset_list))); 10014 charset = CHARSET_FROM_ID (XINT (XCAR (charset_list)));
@@ -10016,7 +10022,7 @@ usage: (define-coding-system-internal ...) */)
10016 else if (EQ (coding_type, Qraw_text)) 10022 else if (EQ (coding_type, Qraw_text))
10017 { 10023 {
10018 category = coding_category_raw_text; 10024 category = coding_category_raw_text;
10019 CODING_ATTR_ASCII_COMPAT (attrs) = Qt; 10025 ASET (attrs, coding_attr_ascii_compat, Qt);
10020 } 10026 }
10021 else if (EQ (coding_type, Qutf_8)) 10027 else if (EQ (coding_type, Qutf_8))
10022 { 10028 {
@@ -10036,7 +10042,7 @@ usage: (define-coding-system-internal ...) */)
10036 } 10042 }
10037 ASET (attrs, coding_attr_utf_bom, bom); 10043 ASET (attrs, coding_attr_utf_bom, bom);
10038 if (NILP (bom)) 10044 if (NILP (bom))
10039 CODING_ATTR_ASCII_COMPAT (attrs) = Qt; 10045 ASET (attrs, coding_attr_ascii_compat, Qt);
10040 10046
10041 category = (CONSP (bom) ? coding_category_utf_8_auto 10047 category = (CONSP (bom) ? coding_category_utf_8_auto
10042 : NILP (bom) ? coding_category_utf_8_nosig 10048 : NILP (bom) ? coding_category_utf_8_nosig
@@ -10048,14 +10054,15 @@ usage: (define-coding-system-internal ...) */)
10048 error ("Invalid coding system type: %s", 10054 error ("Invalid coding system type: %s",
10049 SDATA (SYMBOL_NAME (coding_type))); 10055 SDATA (SYMBOL_NAME (coding_type)));
10050 10056
10051 CODING_ATTR_CATEGORY (attrs) = make_number (category); 10057 ASET (attrs, coding_attr_category, make_number (category));
10052 CODING_ATTR_PLIST (attrs) 10058 ASET (attrs, coding_attr_plist,
10053 = Fcons (QCcategory, Fcons (AREF (Vcoding_category_table, category), 10059 Fcons (QCcategory,
10054 CODING_ATTR_PLIST (attrs))); 10060 Fcons (AREF (Vcoding_category_table, category),
10055 CODING_ATTR_PLIST (attrs) 10061 CODING_ATTR_PLIST (attrs))));
10056 = Fcons (QCascii_compatible_p, 10062 ASET (attrs, coding_attr_plist,
10057 Fcons (CODING_ATTR_ASCII_COMPAT (attrs), 10063 Fcons (QCascii_compatible_p,
10058 CODING_ATTR_PLIST (attrs))); 10064 Fcons (CODING_ATTR_ASCII_COMPAT (attrs),
10065 CODING_ATTR_PLIST (attrs))));
10059 10066
10060 eol_type = args[coding_arg_eol_type]; 10067 eol_type = args[coding_arg_eol_type];
10061 if (! NILP (eol_type) 10068 if (! NILP (eol_type)
@@ -10129,7 +10136,7 @@ DEFUN ("coding-system-put", Fcoding_system_put, Scoding_system_put,
10129 { 10136 {
10130 if (! STRINGP (val)) 10137 if (! STRINGP (val))
10131 CHECK_CHARACTER (val); 10138 CHECK_CHARACTER (val);
10132 CODING_ATTR_MNEMONIC (attrs) = val; 10139 ASET (attrs, coding_attr_mnemonic, val);
10133 } 10140 }
10134 else if (EQ (prop, QCdefault_char)) 10141 else if (EQ (prop, QCdefault_char))
10135 { 10142 {
@@ -10137,37 +10144,37 @@ DEFUN ("coding-system-put", Fcoding_system_put, Scoding_system_put,
10137 val = make_number (' '); 10144 val = make_number (' ');
10138 else 10145 else
10139 CHECK_CHARACTER (val); 10146 CHECK_CHARACTER (val);
10140 CODING_ATTR_DEFAULT_CHAR (attrs) = val; 10147 ASET (attrs, coding_attr_default_char, val);
10141 } 10148 }
10142 else if (EQ (prop, QCdecode_translation_table)) 10149 else if (EQ (prop, QCdecode_translation_table))
10143 { 10150 {
10144 if (! CHAR_TABLE_P (val) && ! CONSP (val)) 10151 if (! CHAR_TABLE_P (val) && ! CONSP (val))
10145 CHECK_SYMBOL (val); 10152 CHECK_SYMBOL (val);
10146 CODING_ATTR_DECODE_TBL (attrs) = val; 10153 ASET (attrs, coding_attr_decode_tbl, val);
10147 } 10154 }
10148 else if (EQ (prop, QCencode_translation_table)) 10155 else if (EQ (prop, QCencode_translation_table))
10149 { 10156 {
10150 if (! CHAR_TABLE_P (val) && ! CONSP (val)) 10157 if (! CHAR_TABLE_P (val) && ! CONSP (val))
10151 CHECK_SYMBOL (val); 10158 CHECK_SYMBOL (val);
10152 CODING_ATTR_ENCODE_TBL (attrs) = val; 10159 ASET (attrs, coding_attr_encode_tbl, val);
10153 } 10160 }
10154 else if (EQ (prop, QCpost_read_conversion)) 10161 else if (EQ (prop, QCpost_read_conversion))
10155 { 10162 {
10156 CHECK_SYMBOL (val); 10163 CHECK_SYMBOL (val);
10157 CODING_ATTR_POST_READ (attrs) = val; 10164 ASET (attrs, coding_attr_post_read, val);
10158 } 10165 }
10159 else if (EQ (prop, QCpre_write_conversion)) 10166 else if (EQ (prop, QCpre_write_conversion))
10160 { 10167 {
10161 CHECK_SYMBOL (val); 10168 CHECK_SYMBOL (val);
10162 CODING_ATTR_PRE_WRITE (attrs) = val; 10169 ASET (attrs, coding_attr_pre_write, val);
10163 } 10170 }
10164 else if (EQ (prop, QCascii_compatible_p)) 10171 else if (EQ (prop, QCascii_compatible_p))
10165 { 10172 {
10166 CODING_ATTR_ASCII_COMPAT (attrs) = val; 10173 ASET (attrs, coding_attr_ascii_compat, val);
10167 } 10174 }
10168 10175
10169 CODING_ATTR_PLIST (attrs) 10176 ASET (attrs, coding_attr_plist,
10170 = Fplist_put (CODING_ATTR_PLIST (attrs), prop, val); 10177 Fplist_put (CODING_ATTR_PLIST (attrs), prop, val));
10171 return val; 10178 return val;
10172} 10179}
10173 10180
@@ -10411,7 +10418,7 @@ syms_of_coding (void)
10411 10418
10412 DEFSYM (Qcoding_system_error, "coding-system-error"); 10419 DEFSYM (Qcoding_system_error, "coding-system-error");
10413 Fput (Qcoding_system_error, Qerror_conditions, 10420 Fput (Qcoding_system_error, Qerror_conditions,
10414 pure_cons (Qcoding_system_error, pure_cons (Qerror, Qnil))); 10421 listn (CONSTYPE_PURE, 2, Qcoding_system_error, Qerror));
10415 Fput (Qcoding_system_error, Qerror_message, 10422 Fput (Qcoding_system_error, Qerror_message,
10416 build_pure_c_string ("Invalid coding system")); 10423 build_pure_c_string ("Invalid coding system"));
10417 10424