2008-03-25 Stefan Monnier <monnier@iro.umontreal.ca>
+ * 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.
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. */
= (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))
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
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;
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,
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;
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);
}
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);
/* 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