aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa <[email protected]>1998-07-16 00:14:44 +0000
committerKenichi Handa <[email protected]>1998-07-16 00:14:44 +0000
commit8bc49fd1f3a9cdcf01d8e9bfcc7046527778cef3 (patch)
tree34d900e0137352eca8c306e53b4a7a8e74a40ed8 /src
parent9959c16e4f83ba4798ffa089261d8f4b0a30361a (diff)
(read_process_output): Even if we read data without
code conversion, calculate character counts. If we insert the data into a unibyte buffer, treat the data as unibyte.
Diffstat (limited to 'src')
-rw-r--r--src/process.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/process.c b/src/process.c
index c8ee4b96ea..4d362b95d1 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2911,21 +2911,24 @@ read_process_output (proc, channel)
: coding->produced_char);
chars_in_decoding_buf = 1;
}
-#ifdef VMS
- else if (chars_allocated)
+ else
{
- /* Although we don't have to decode the received data, we must
- move it to an area which we don't have to free. */
- if (! STRINGP (p->decoding_buf)
- || STRING_BYTES (XSTRING (p->decoding_buf)) < nbytes)
- p->decoding_buf = make_uninit_string (nbytes);
- bcopy (chars, XSTRING (p->decoding_buf)->data, nbytes);
- free (chars);
- chars = XSTRING (p->decoding_buf)->data;
+#ifdef VMS
+ if (chars_allocated)
+ {
+ /* Although we don't have to decode the received data, we
+ must move it to an area which we don't have to free. */
+ if (! STRINGP (p->decoding_buf)
+ || STRING_BYTES (XSTRING (p->decoding_buf)) < nbytes)
+ p->decoding_buf = make_uninit_string (nbytes);
+ bcopy (chars, XSTRING (p->decoding_buf)->data, nbytes);
+ free (chars);
+ chars = XSTRING (p->decoding_buf)->data;
+ chars_in_decoding_buf = 1;
+ }
+#endif
nchars = multibyte_chars_in_text (chars, nbytes);
- chars_in_decoding_buf = 1;
}
-#endif
Vlast_coding_system_used = coding->symbol;
@@ -3054,6 +3057,9 @@ read_process_output (proc, channel)
if (! (BEGV <= PT && PT <= ZV))
Fwiden ();
+ if (NILP (current_buffer->enable_multibyte_characters))
+ nchars = nbytes;
+
/* Insert before markers in case we are inserting where
the buffer's mark is, and the user's next command is Meta-y. */
if (chars_in_decoding_buf)