Mercurial > hg > xemacs-beta
comparison src/mule-coding.c @ 110:fe104dbd9147 r20-1b7
Import from CVS: tag r20-1b7
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:19:45 +0200 |
parents | dbb370e3c29e |
children | 8619ce7e4c50 |
comparison
equal
deleted
inserted
replaced
109:e183fc049578 | 110:fe104dbd9147 |
---|---|
30 #include "elhash.h" | 30 #include "elhash.h" |
31 #include "insdel.h" | 31 #include "insdel.h" |
32 #include "lstream.h" | 32 #include "lstream.h" |
33 #include "mule-coding.h" | 33 #include "mule-coding.h" |
34 | 34 |
35 Lisp_Object Qfile_coding_system, Qcoding_system_error; | 35 Lisp_Object Qbuffer_file_coding_system, Qcoding_system_error; |
36 | 36 |
37 Lisp_Object Vkeyboard_coding_system; | 37 Lisp_Object Vkeyboard_coding_system; |
38 Lisp_Object Vterminal_coding_system; | 38 Lisp_Object Vterminal_coding_system; |
39 Lisp_Object Vprocess_input_coding_system; | 39 Lisp_Object Vprocess_input_coding_system; |
40 Lisp_Object Vprocess_output_coding_system; | 40 Lisp_Object Vprocess_output_coding_system; |
1371 coding_system_from_mask (int mask) | 1371 coding_system_from_mask (int mask) |
1372 { | 1372 { |
1373 if (mask == ~0) | 1373 if (mask == ~0) |
1374 { | 1374 { |
1375 /* If the file was entirely or basically ASCII, use the | 1375 /* If the file was entirely or basically ASCII, use the |
1376 default value of `file-coding-system'. */ | 1376 default value of `buffer-file-coding-system'. */ |
1377 Lisp_Object retval = | 1377 Lisp_Object retval = |
1378 XBUFFER (Vbuffer_defaults)->file_coding_system; | 1378 XBUFFER (Vbuffer_defaults)->buffer_file_coding_system; |
1379 if (!NILP (retval)) | 1379 if (!NILP (retval)) |
1380 { | 1380 { |
1381 retval = Ffind_coding_system (retval); | 1381 retval = Ffind_coding_system (retval); |
1382 if (NILP (retval)) | 1382 if (NILP (retval)) |
1383 { | 1383 { |
1384 warn_when_safe | 1384 warn_when_safe |
1385 (Qbad_variable, Qwarning, | 1385 (Qbad_variable, Qwarning, |
1386 "Invalid `default-file-coding-system', set to nil"); | 1386 "Invalid `default-buffer-file-coding-system', set to nil"); |
1387 XBUFFER (Vbuffer_defaults)->file_coding_system = Qnil; | 1387 XBUFFER (Vbuffer_defaults)->buffer_file_coding_system = Qnil; |
1388 } | 1388 } |
1389 } | 1389 } |
1390 if (NILP (retval)) | 1390 if (NILP (retval)) |
1391 retval = Fget_coding_system (Qno_conversion); | 1391 retval = Fget_coding_system (Qno_conversion); |
1392 return retval; | 1392 return retval; |
4567 /************************************************************************/ | 4567 /************************************************************************/ |
4568 | 4568 |
4569 void | 4569 void |
4570 syms_of_mule_coding (void) | 4570 syms_of_mule_coding (void) |
4571 { | 4571 { |
4572 defsymbol (&Qfile_coding_system, "file-coding-system"); | 4572 defsymbol (&Qbuffer_file_coding_system, "buffer-file-coding-system"); |
4573 deferror (&Qcoding_system_error, "coding-system-error", | 4573 deferror (&Qcoding_system_error, "coding-system-error", |
4574 "Coding-system error", Qio_error); | 4574 "Coding-system error", Qio_error); |
4575 | 4575 |
4576 DEFSUBR (Fcoding_system_p); | 4576 DEFSUBR (Fcoding_system_p); |
4577 DEFSUBR (Ffind_coding_system); | 4577 DEFSUBR (Ffind_coding_system); |