aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1997-07-07 00:59:44 +0000
committerKenichi Handa1997-07-07 00:59:44 +0000
commit11f84d7d6d5fbc124ca69259807e5f691331526a (patch)
tree626b0a183e57abb21d7af124dc14eee5561209d7 /src
parentcbc64b2ac640f716f81b2aaf1a64b808ab060414 (diff)
downloademacs-11f84d7d6d5fbc124ca69259807e5f691331526a.tar.gz
emacs-11f84d7d6d5fbc124ca69259807e5f691331526a.zip
(Fstart_process): If enable-multibyte-characters is
nil, set coding system for decoding output of process to emacs-mule, and set coding system for encoding to nil. (Fopen_network_stream): If enable-multibyte-characters is nil, set coding systems for decoding and encoding to nil.
Diffstat (limited to 'src')
-rw-r--r--src/process.c36
1 files changed, 32 insertions, 4 deletions
diff --git a/src/process.c b/src/process.c
index 459b822df61..f2b872d3437 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1174,7 +1174,11 @@ Remaining arguments are strings to give program as arguments.")
1174 Lisp_Object val, *args2; 1174 Lisp_Object val, *args2;
1175 struct gcpro gcpro1; 1175 struct gcpro gcpro1;
1176 1176
1177 if (NILP (val = Vcoding_system_for_read)) 1177 if (!NILP (Vcoding_system_for_read))
1178 val = Vcoding_system_for_read;
1179 else if (NILP (current_buffer->enable_multibyte_characters))
1180 val = Qemacs_mule;
1181 else
1178 { 1182 {
1179 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); 1183 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2);
1180 args2[0] = Qstart_process; 1184 args2[0] = Qstart_process;
@@ -1186,10 +1190,16 @@ Remaining arguments are strings to give program as arguments.")
1186 val = XCONS (coding_systems)->car; 1190 val = XCONS (coding_systems)->car;
1187 else if (CONSP (Vdefault_process_coding_system)) 1191 else if (CONSP (Vdefault_process_coding_system))
1188 val = XCONS (Vdefault_process_coding_system)->car; 1192 val = XCONS (Vdefault_process_coding_system)->car;
1193 else
1194 val = Qnil;
1189 } 1195 }
1190 XPROCESS (proc)->decode_coding_system = val; 1196 XPROCESS (proc)->decode_coding_system = val;
1191 1197
1192 if (NILP (val = Vcoding_system_for_write)) 1198 if (!NILP (Vcoding_system_for_write))
1199 val = Vcoding_system_for_write;
1200 else if (NILP (current_buffer->enable_multibyte_characters))
1201 val = Qnil;
1202 else
1193 { 1203 {
1194 if (EQ (coding_systems, Qt)) 1204 if (EQ (coding_systems, Qt))
1195 { 1205 {
@@ -1205,6 +1215,8 @@ Remaining arguments are strings to give program as arguments.")
1205 val = XCONS (coding_systems)->cdr; 1215 val = XCONS (coding_systems)->cdr;
1206 else if (CONSP (Vdefault_process_coding_system)) 1216 else if (CONSP (Vdefault_process_coding_system))
1207 val = XCONS (Vdefault_process_coding_system)->cdr; 1217 val = XCONS (Vdefault_process_coding_system)->cdr;
1218 else
1219 val = Qnil;
1208 } 1220 }
1209 XPROCESS (proc)->encode_coding_system = val; 1221 XPROCESS (proc)->encode_coding_system = val;
1210 } 1222 }
@@ -1907,7 +1919,15 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
1907 Lisp_Object coding_systems = Qt; 1919 Lisp_Object coding_systems = Qt;
1908 Lisp_Object args[5], val; 1920 Lisp_Object args[5], val;
1909 1921
1910 if (NILP (val = Vcoding_system_for_read)) 1922 if (!NILP (Vcoding_system_for_read))
1923 val = Vcoding_system_for_read;
1924 else if (NILP (current_buffer->enable_multibyte_characters))
1925 /* We dare not decode end-of-line format by setting VAL to
1926 Qemacs_mule, because the existing Emacs Lisp libraries
1927 assume that they receive bare code including a sequene of
1928 CR LF. */
1929 val = Qnil;
1930 else
1911 { 1931 {
1912 args[0] = Qopen_network_stream, args[1] = name, 1932 args[0] = Qopen_network_stream, args[1] = name,
1913 args[2] = buffer, args[3] = host, args[4] = service; 1933 args[2] = buffer, args[3] = host, args[4] = service;
@@ -1918,10 +1938,16 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
1918 val = XCONS (coding_systems)->car; 1938 val = XCONS (coding_systems)->car;
1919 else if (CONSP (Vdefault_process_coding_system)) 1939 else if (CONSP (Vdefault_process_coding_system))
1920 val = XCONS (Vdefault_process_coding_system)->car; 1940 val = XCONS (Vdefault_process_coding_system)->car;
1941 else
1942 val = Qnil;
1921 } 1943 }
1922 XPROCESS (proc)->decode_coding_system = val; 1944 XPROCESS (proc)->decode_coding_system = val;
1923 1945
1924 if (NILP (val = Vcoding_system_for_write)) 1946 if (!NILP (Vcoding_system_for_write))
1947 val = Vcoding_system_for_write;
1948 else if (NILP (current_buffer->enable_multibyte_characters))
1949 val = Qnil;
1950 else
1925 { 1951 {
1926 if (EQ (coding_systems, Qt)) 1952 if (EQ (coding_systems, Qt))
1927 { 1953 {
@@ -1935,6 +1961,8 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
1935 val = XCONS (coding_systems)->cdr; 1961 val = XCONS (coding_systems)->cdr;
1936 else if (CONSP (Vdefault_process_coding_system)) 1962 else if (CONSP (Vdefault_process_coding_system))
1937 val = XCONS (Vdefault_process_coding_system)->cdr; 1963 val = XCONS (Vdefault_process_coding_system)->cdr;
1964 else
1965 val = Qnil;
1938 } 1966 }
1939 XPROCESS (proc)->encode_coding_system = val; 1967 XPROCESS (proc)->encode_coding_system = val;
1940 } 1968 }