diff src/process.c @ 93201:5dbe361f12c2

* process.h (struct Lisp_Process): Remove filter_multibyte. * process.c (QCfilter_multibyte): Remove. (setup_process_coding_systems): Don't use filter_multibyte. (Fstart_process, Fmake_network_process): Don't set filter_multibyte. (read_process_output): Don't adjust multibyteness to filter_multibyte. (Fset_process_filter_multibyte): Change the coding-system to approximate the previous behavior. (Fprocess_filter_multibyte_p): Get the multibyteness straight from the coding-system.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 25 Mar 2008 17:35:48 +0000
parents f32eae6092fa
children 41f9d37301a2
line wrap: on
line diff
--- a/src/process.c	Tue Mar 25 17:32:20 2008 +0000
+++ b/src/process.c	Tue Mar 25 17:35:48 2008 +0000
@@ -145,7 +145,6 @@
 Lisp_Object QClocal, QCremote, QCcoding;
 Lisp_Object QCserver, QCnowait, QCnoquery, QCstop;
 Lisp_Object QCsentinel, QClog, QCoptions, QCplist;
-Lisp_Object QCfilter_multibyte;
 Lisp_Object Qlast_nonmenu_event;
 /* QCfamily is declared and initialized in xfaces.c,
    QCfilter in keyboard.c.  */
@@ -670,10 +669,7 @@
       = (struct coding_system *) xmalloc (sizeof (struct coding_system));
   coding_system = p->decode_coding_system;
   if (! NILP (p->filter))
-    {
-      if (!p->filter_multibyte)
-	coding_system = raw_text_coding_system (coding_system);
-    }
+    ;
   else if (BUFFERP (p->buffer))
     {
       if (NILP (XBUFFER (p->buffer)->enable_multibyte_characters))
@@ -1628,8 +1624,6 @@
   XPROCESS (proc)->buffer = buffer;
   XPROCESS (proc)->sentinel = Qnil;
   XPROCESS (proc)->filter = Qnil;
-  XPROCESS (proc)->filter_multibyte
-    = !NILP (buffer_defaults.enable_multibyte_characters);
   XPROCESS (proc)->command = Flist (nargs - 2, args + 2);
 
 #ifdef ADAPTIVE_READ_BUFFERING
@@ -3407,10 +3401,6 @@
   p->buffer = buffer;
   p->sentinel = sentinel;
   p->filter = filter;
-  p->filter_multibyte = !NILP (buffer_defaults.enable_multibyte_characters);
-  /* Override the above only if :filter-multibyte is specified.  */
-  if (! NILP (Fplist_member (contact, QCfilter_multibyte)))
-    p->filter_multibyte = !NILP (Fplist_get (contact, QCfilter_multibyte));
   p->log = Fplist_get (contact, QClog);
   if (tem = Fplist_get (contact, QCnoquery), !NILP (tem))
     p->kill_without_query = 1;
@@ -5169,11 +5159,6 @@
 		 coding->carryover_bytes);
 	  p->decoding_carryover = coding->carryover_bytes;
 	}
-      /* Adjust the multibyteness of TEXT to that of the filter.  */
-      if (!p->filter_multibyte != !STRING_MULTIBYTE (text))
-	text = (STRING_MULTIBYTE (text)
-		? Fstring_as_unibyte (text)
-		: Fstring_to_multibyte (text));
       if (SBYTES (text) > 0)
 	internal_condition_case_1 (read_process_output_call,
 				   Fcons (outstream,
@@ -6834,7 +6819,8 @@
 
   CHECK_PROCESS (process);
   p = XPROCESS (process);
-  p->filter_multibyte = !NILP (flag);
+  if (NILP (flag))
+    p->decode_coding_system = raw_text_coding_system (p->decode_coding_system);
   setup_process_coding_systems (process);
 
   return Qnil;
@@ -6847,11 +6833,12 @@
      Lisp_Object process;
 {
   register struct Lisp_Process *p;
+  struct coding_system *coding;
 
   CHECK_PROCESS (process);
   p = XPROCESS (process);
-
-  return (p->filter_multibyte ? Qt : Qnil);
+  coding = proc_decode_coding_system[p->infd];
+  return (CODING_FOR_UNIBYTE (coding) ? Qnil : Qt);
 }
 
 
@@ -7109,8 +7096,6 @@
   staticpro (&QCoptions);
   QCplist = intern (":plist");
   staticpro (&QCplist);
-  QCfilter_multibyte = intern (":filter-multibyte");
-  staticpro (&QCfilter_multibyte);
 
   Qlast_nonmenu_event = intern ("last-nonmenu-event");
   staticpro (&Qlast_nonmenu_event);