comparison src/coding.c @ 19750:95e4e1cba6ac

(Qcoding_system_history): New variable. (syms_of_coding): Initialize it. (Fread_coding_system): Use Qcoding_system_history.
author Richard M. Stallman <rms@gnu.org>
date Thu, 04 Sep 1997 05:58:20 +0000
parents bed06df9cbc5
children 49a1662b68dd
comparison
equal deleted inserted replaced
19749:dec0b076a378 19750:95e4e1cba6ac
251 251
252 Lisp_Object Qcoding_system, Qeol_type; 252 Lisp_Object Qcoding_system, Qeol_type;
253 Lisp_Object Qbuffer_file_coding_system; 253 Lisp_Object Qbuffer_file_coding_system;
254 Lisp_Object Qpost_read_conversion, Qpre_write_conversion; 254 Lisp_Object Qpost_read_conversion, Qpre_write_conversion;
255 Lisp_Object Qno_conversion, Qundecided; 255 Lisp_Object Qno_conversion, Qundecided;
256 Lisp_Object Qcoding_system_history;
256 257
257 extern Lisp_Object Qinsert_file_contents, Qwrite_region; 258 extern Lisp_Object Qinsert_file_contents, Qwrite_region;
258 Lisp_Object Qcall_process, Qcall_process_region, Qprocess_argument; 259 Lisp_Object Qcall_process, Qcall_process_region, Qprocess_argument;
259 Lisp_Object Qstart_process, Qopen_network_stream; 260 Lisp_Object Qstart_process, Qopen_network_stream;
260 Lisp_Object Qtarget_idx; 261 Lisp_Object Qtarget_idx;
3116 (prompt) 3117 (prompt)
3117 Lisp_Object prompt; 3118 Lisp_Object prompt;
3118 { 3119 {
3119 Lisp_Object val; 3120 Lisp_Object val;
3120 val = Fcompleting_read (prompt, Vobarray, Qcoding_system_p, 3121 val = Fcompleting_read (prompt, Vobarray, Qcoding_system_p,
3121 Qt, Qnil, Qnil, Qnil, Qnil); 3122 Qt, Qnil, Qcoding_system_history, Qnil, Qnil);
3122 return (XSTRING (val)->size == 0 ? Qnil : Fintern (val, Qnil)); 3123 return (XSTRING (val)->size == 0 ? Qnil : Fintern (val, Qnil));
3123 } 3124 }
3124 3125
3125 DEFUN ("check-coding-system", Fcheck_coding_system, Scheck_coding_system, 3126 DEFUN ("check-coding-system", Fcheck_coding_system, Scheck_coding_system,
3126 1, 1, 0, 3127 1, 1, 0,
3861 syms_of_coding () 3862 syms_of_coding ()
3862 { 3863 {
3863 Qtarget_idx = intern ("target-idx"); 3864 Qtarget_idx = intern ("target-idx");
3864 staticpro (&Qtarget_idx); 3865 staticpro (&Qtarget_idx);
3865 3866
3867 Qcoding_system_history = intern ("coding-system-history");
3868 staticpro (&Qcoding_system_history);
3869 Fset (Qcoding_system_history, Qnil);
3870
3866 /* Target FILENAME is the first argument. */ 3871 /* Target FILENAME is the first argument. */
3867 Fput (Qinsert_file_contents, Qtarget_idx, make_number (0)); 3872 Fput (Qinsert_file_contents, Qtarget_idx, make_number (0));
3868 /* Target FILENAME is the third argument. */ 3873 /* Target FILENAME is the third argument. */
3869 Fput (Qwrite_region, Qtarget_idx, make_number (2)); 3874 Fput (Qwrite_region, Qtarget_idx, make_number (2));
3870 3875
4102 4107
4103 DEFVAR_LISP ("latin-extra-code-table", &Vlatin_extra_code_table, 4108 DEFVAR_LISP ("latin-extra-code-table", &Vlatin_extra_code_table,
4104 "Table of extra Latin codes in the range 128..159 (inclusive).\n\ 4109 "Table of extra Latin codes in the range 128..159 (inclusive).\n\
4105 This is a vector of length 256.\n\ 4110 This is a vector of length 256.\n\
4106 If Nth element is non-nil, the existence of code N in a file\n\ 4111 If Nth element is non-nil, the existence of code N in a file\n\
4107 (or output of subprocess) doesn't prevent it to be detected as\n\ 4112 \(or output of subprocess) doesn't prevent it to be detected as\n\
4108 a coding system of ISO 2022 variant which has a flag\n\ 4113 a coding system of ISO 2022 variant which has a flag\n\
4109 `accept-latin-extra-code' t (e.g. iso-latin-1) on reading a file\n\ 4114 `accept-latin-extra-code' t (e.g. iso-latin-1) on reading a file\n\
4110 or reading output of a subprocess.\n\ 4115 or reading output of a subprocess.\n\
4111 Only 128th through 159th elements has a meaning."); 4116 Only 128th through 159th elements has a meaning.");
4112 Vlatin_extra_code_table = Fmake_vector (make_number (256), Qnil); 4117 Vlatin_extra_code_table = Fmake_vector (make_number (256), Qnil);