# HG changeset patch # User Stefan Monnier # Date 1206466548 0 # Node ID 5dbe361f12c2412d73e18a3f48d503d09f7f0a4e # Parent c264aa814b1508a1a2a6f9a397aa6710516ff64c * 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. diff -r c264aa814b15 -r 5dbe361f12c2 src/ChangeLog --- a/src/ChangeLog Tue Mar 25 17:32:20 2008 +0000 +++ b/src/ChangeLog Tue Mar 25 17:35:48 2008 +0000 @@ -1,5 +1,15 @@ 2008-03-25 Stefan Monnier + * 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. + * coding.c (decode_coding_object): When not decoding into a buffer, obey the coding system's preference of (uni|multi)byte. diff -r c264aa814b15 -r 5dbe361f12c2 src/process.c --- 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); diff -r c264aa814b15 -r 5dbe361f12c2 src/process.h --- a/src/process.h Tue Mar 25 17:32:20 2008 +0000 +++ b/src/process.h Tue Mar 25 17:35:48 2008 +0000 @@ -113,12 +113,6 @@ /* Flag to set coding-system of the process buffer from the coding_system used to decode process output. */ unsigned int inherit_coding_system_flag : 1; - /* Flag to decide the multibyteness of a string given to the - filter (if any). It is initialized to the value of - `default-enable-multibyte-characters' when the process is - generated, and can be changed by the function - `set-process-filter-multibyte'. */ - unsigned int filter_multibyte : 1; /* Record the process status in the raw form in which it comes from `wait'. This is to avoid consing in a signal handler. The `raw_status_new' flag indicates that `raw_status' contains a new status that still