Mercurial > emacs
comparison src/coding.c @ 70704:576f5c8ea6e4
(Qascii_incompatible): New variable.
(syms_of_coding): Setup Qascii_incompatible.
(setup_coding_system): Be sure to initialize coding->common_flags.
Check `ascii-incompatible' property of the coding system.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Thu, 18 May 2006 02:19:01 +0000 |
| parents | b6740a317343 |
| children | 7ea8b1c11d80 ab6ab63755f7 |
comparison
equal
deleted
inserted
replaced
| 70703:85b353760b1c | 70704:576f5c8ea6e4 |
|---|---|
| 361 Lisp_Object Qpost_read_conversion, Qpre_write_conversion; | 361 Lisp_Object Qpost_read_conversion, Qpre_write_conversion; |
| 362 Lisp_Object Qno_conversion, Qundecided; | 362 Lisp_Object Qno_conversion, Qundecided; |
| 363 Lisp_Object Qcoding_system_history; | 363 Lisp_Object Qcoding_system_history; |
| 364 Lisp_Object Qsafe_chars; | 364 Lisp_Object Qsafe_chars; |
| 365 Lisp_Object Qvalid_codes; | 365 Lisp_Object Qvalid_codes; |
| 366 Lisp_Object Qascii_incompatible; | |
| 366 | 367 |
| 367 extern Lisp_Object Qinsert_file_contents, Qwrite_region; | 368 extern Lisp_Object Qinsert_file_contents, Qwrite_region; |
| 368 Lisp_Object Qcall_process, Qcall_process_region; | 369 Lisp_Object Qcall_process, Qcall_process_region; |
| 369 Lisp_Object Qstart_process, Qopen_network_stream; | 370 Lisp_Object Qstart_process, Qopen_network_stream; |
| 370 Lisp_Object Qtarget_idx; | 371 Lisp_Object Qtarget_idx; |
| 3623 coding->eol_type = CODING_EOL_CR; | 3624 coding->eol_type = CODING_EOL_CR; |
| 3624 coding->common_flags | 3625 coding->common_flags |
| 3625 = CODING_REQUIRE_DECODING_MASK | CODING_REQUIRE_ENCODING_MASK; | 3626 = CODING_REQUIRE_DECODING_MASK | CODING_REQUIRE_ENCODING_MASK; |
| 3626 } | 3627 } |
| 3627 else | 3628 else |
| 3628 coding->eol_type = CODING_EOL_LF; | 3629 { |
| 3630 coding->common_flags = 0; | |
| 3631 coding->eol_type = CODING_EOL_LF; | |
| 3632 } | |
| 3629 | 3633 |
| 3630 coding_type = XVECTOR (coding_spec)->contents[0]; | 3634 coding_type = XVECTOR (coding_spec)->contents[0]; |
| 3631 /* Try short cut. */ | 3635 /* Try short cut. */ |
| 3632 if (SYMBOLP (coding_type)) | 3636 if (SYMBOLP (coding_type)) |
| 3633 { | 3637 { |
| 3682 /* If the coding system has non-nil `composition' property, enable | 3686 /* If the coding system has non-nil `composition' property, enable |
| 3683 composition handling. */ | 3687 composition handling. */ |
| 3684 val = Fplist_get (plist, Qcomposition); | 3688 val = Fplist_get (plist, Qcomposition); |
| 3685 if (!NILP (val)) | 3689 if (!NILP (val)) |
| 3686 coding->composing = COMPOSITION_NO; | 3690 coding->composing = COMPOSITION_NO; |
| 3691 | |
| 3692 /* If the coding system is ascii-incompatible, record it in | |
| 3693 common_flags. */ | |
| 3694 val = Fplist_get (plist, Qascii_incompatible); | |
| 3695 if (! NILP (val)) | |
| 3696 coding->common_flags |= CODING_ASCII_INCOMPATIBLE_MASK; | |
| 3687 | 3697 |
| 3688 switch (XFASTINT (coding_type)) | 3698 switch (XFASTINT (coding_type)) |
| 3689 { | 3699 { |
| 3690 case 0: | 3700 case 0: |
| 3691 coding->type = coding_type_emacs_mule; | 3701 coding->type = coding_type_emacs_mule; |
| 7812 Fput (Qchar_coding_system, Qchar_table_extra_slots, make_number (0)); | 7822 Fput (Qchar_coding_system, Qchar_table_extra_slots, make_number (0)); |
| 7813 | 7823 |
| 7814 Qvalid_codes = intern ("valid-codes"); | 7824 Qvalid_codes = intern ("valid-codes"); |
| 7815 staticpro (&Qvalid_codes); | 7825 staticpro (&Qvalid_codes); |
| 7816 | 7826 |
| 7827 Qascii_incompatible = intern ("ascii-incompatible"); | |
| 7828 staticpro (&Qascii_incompatible); | |
| 7829 | |
| 7817 Qemacs_mule = intern ("emacs-mule"); | 7830 Qemacs_mule = intern ("emacs-mule"); |
| 7818 staticpro (&Qemacs_mule); | 7831 staticpro (&Qemacs_mule); |
| 7819 | 7832 |
| 7820 Qraw_text = intern ("raw-text"); | 7833 Qraw_text = intern ("raw-text"); |
| 7821 staticpro (&Qraw_text); | 7834 staticpro (&Qraw_text); |
