diff options
author | Kenichi Handa <handa@m17n.org> | 1997-07-07 00:59:44 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1997-07-07 00:59:44 +0000 |
commit | 4632e6b2770da1a24781b29342d5f8226a45149c (patch) | |
tree | bd6c73be893c980dcea623d9e960bde6de6f03e0 /src/process.c | |
parent | 37c707cf39b69d291067f073826b89f23d3c6246 (diff) | |
download | emacs-4632e6b2770da1a24781b29342d5f8226a45149c.tar.gz |
(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/process.c')
-rw-r--r-- | src/process.c | 36 |
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.") Lisp_Object val, *args2; struct gcpro gcpro1; - if (NILP (val = Vcoding_system_for_read)) + if (!NILP (Vcoding_system_for_read)) + val = Vcoding_system_for_read; + else if (NILP (current_buffer->enable_multibyte_characters)) + val = Qemacs_mule; + else { args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); args2[0] = Qstart_process; @@ -1186,10 +1190,16 @@ Remaining arguments are strings to give program as arguments.") val = XCONS (coding_systems)->car; else if (CONSP (Vdefault_process_coding_system)) val = XCONS (Vdefault_process_coding_system)->car; + else + val = Qnil; } XPROCESS (proc)->decode_coding_system = val; - if (NILP (val = Vcoding_system_for_write)) + if (!NILP (Vcoding_system_for_write)) + val = Vcoding_system_for_write; + else if (NILP (current_buffer->enable_multibyte_characters)) + val = Qnil; + else { if (EQ (coding_systems, Qt)) { @@ -1205,6 +1215,8 @@ Remaining arguments are strings to give program as arguments.") val = XCONS (coding_systems)->cdr; else if (CONSP (Vdefault_process_coding_system)) val = XCONS (Vdefault_process_coding_system)->cdr; + else + val = Qnil; } XPROCESS (proc)->encode_coding_system = val; } @@ -1907,7 +1919,15 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\ Lisp_Object coding_systems = Qt; Lisp_Object args[5], val; - if (NILP (val = Vcoding_system_for_read)) + if (!NILP (Vcoding_system_for_read)) + val = Vcoding_system_for_read; + else if (NILP (current_buffer->enable_multibyte_characters)) + /* We dare not decode end-of-line format by setting VAL to + Qemacs_mule, because the existing Emacs Lisp libraries + assume that they receive bare code including a sequene of + CR LF. */ + val = Qnil; + else { args[0] = Qopen_network_stream, args[1] = name, 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\ val = XCONS (coding_systems)->car; else if (CONSP (Vdefault_process_coding_system)) val = XCONS (Vdefault_process_coding_system)->car; + else + val = Qnil; } XPROCESS (proc)->decode_coding_system = val; - if (NILP (val = Vcoding_system_for_write)) + if (!NILP (Vcoding_system_for_write)) + val = Vcoding_system_for_write; + else if (NILP (current_buffer->enable_multibyte_characters)) + val = Qnil; + else { if (EQ (coding_systems, Qt)) { @@ -1935,6 +1961,8 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\ val = XCONS (coding_systems)->cdr; else if (CONSP (Vdefault_process_coding_system)) val = XCONS (Vdefault_process_coding_system)->cdr; + else + val = Qnil; } XPROCESS (proc)->encode_coding_system = val; } |