diff options
| author | Stefan Monnier | 2008-03-25 17:35:48 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-03-25 17:35:48 +0000 |
| commit | 5431bd6a789edd0ef05b5be0a1a33355849c164f (patch) | |
| tree | 5cc40388e7788d7b96faa562bff8c68f24af4ccf /src/process.c | |
| parent | 379ec02c03febd0955b2c235c9e596db82fef8a0 (diff) | |
| download | emacs-5431bd6a789edd0ef05b5be0a1a33355849c164f.tar.gz emacs-5431bd6a789edd0ef05b5be0a1a33355849c164f.zip | |
* 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.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/src/process.c b/src/process.c index e959dea41c0..9c7e542c3be 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -145,7 +145,6 @@ Lisp_Object QCname, QCbuffer, QChost, QCservice, QCtype; | |||
| 145 | Lisp_Object QClocal, QCremote, QCcoding; | 145 | Lisp_Object QClocal, QCremote, QCcoding; |
| 146 | Lisp_Object QCserver, QCnowait, QCnoquery, QCstop; | 146 | Lisp_Object QCserver, QCnowait, QCnoquery, QCstop; |
| 147 | Lisp_Object QCsentinel, QClog, QCoptions, QCplist; | 147 | Lisp_Object QCsentinel, QClog, QCoptions, QCplist; |
| 148 | Lisp_Object QCfilter_multibyte; | ||
| 149 | Lisp_Object Qlast_nonmenu_event; | 148 | Lisp_Object Qlast_nonmenu_event; |
| 150 | /* QCfamily is declared and initialized in xfaces.c, | 149 | /* QCfamily is declared and initialized in xfaces.c, |
| 151 | QCfilter in keyboard.c. */ | 150 | QCfilter in keyboard.c. */ |
| @@ -670,10 +669,7 @@ setup_process_coding_systems (process) | |||
| 670 | = (struct coding_system *) xmalloc (sizeof (struct coding_system)); | 669 | = (struct coding_system *) xmalloc (sizeof (struct coding_system)); |
| 671 | coding_system = p->decode_coding_system; | 670 | coding_system = p->decode_coding_system; |
| 672 | if (! NILP (p->filter)) | 671 | if (! NILP (p->filter)) |
| 673 | { | 672 | ; |
| 674 | if (!p->filter_multibyte) | ||
| 675 | coding_system = raw_text_coding_system (coding_system); | ||
| 676 | } | ||
| 677 | else if (BUFFERP (p->buffer)) | 673 | else if (BUFFERP (p->buffer)) |
| 678 | { | 674 | { |
| 679 | if (NILP (XBUFFER (p->buffer)->enable_multibyte_characters)) | 675 | if (NILP (XBUFFER (p->buffer)->enable_multibyte_characters)) |
| @@ -1628,8 +1624,6 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1628 | XPROCESS (proc)->buffer = buffer; | 1624 | XPROCESS (proc)->buffer = buffer; |
| 1629 | XPROCESS (proc)->sentinel = Qnil; | 1625 | XPROCESS (proc)->sentinel = Qnil; |
| 1630 | XPROCESS (proc)->filter = Qnil; | 1626 | XPROCESS (proc)->filter = Qnil; |
| 1631 | XPROCESS (proc)->filter_multibyte | ||
| 1632 | = !NILP (buffer_defaults.enable_multibyte_characters); | ||
| 1633 | XPROCESS (proc)->command = Flist (nargs - 2, args + 2); | 1627 | XPROCESS (proc)->command = Flist (nargs - 2, args + 2); |
| 1634 | 1628 | ||
| 1635 | #ifdef ADAPTIVE_READ_BUFFERING | 1629 | #ifdef ADAPTIVE_READ_BUFFERING |
| @@ -3407,10 +3401,6 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3407 | p->buffer = buffer; | 3401 | p->buffer = buffer; |
| 3408 | p->sentinel = sentinel; | 3402 | p->sentinel = sentinel; |
| 3409 | p->filter = filter; | 3403 | p->filter = filter; |
| 3410 | p->filter_multibyte = !NILP (buffer_defaults.enable_multibyte_characters); | ||
| 3411 | /* Override the above only if :filter-multibyte is specified. */ | ||
| 3412 | if (! NILP (Fplist_member (contact, QCfilter_multibyte))) | ||
| 3413 | p->filter_multibyte = !NILP (Fplist_get (contact, QCfilter_multibyte)); | ||
| 3414 | p->log = Fplist_get (contact, QClog); | 3404 | p->log = Fplist_get (contact, QClog); |
| 3415 | if (tem = Fplist_get (contact, QCnoquery), !NILP (tem)) | 3405 | if (tem = Fplist_get (contact, QCnoquery), !NILP (tem)) |
| 3416 | p->kill_without_query = 1; | 3406 | p->kill_without_query = 1; |
| @@ -5169,11 +5159,6 @@ read_process_output (proc, channel) | |||
| 5169 | coding->carryover_bytes); | 5159 | coding->carryover_bytes); |
| 5170 | p->decoding_carryover = coding->carryover_bytes; | 5160 | p->decoding_carryover = coding->carryover_bytes; |
| 5171 | } | 5161 | } |
| 5172 | /* Adjust the multibyteness of TEXT to that of the filter. */ | ||
| 5173 | if (!p->filter_multibyte != !STRING_MULTIBYTE (text)) | ||
| 5174 | text = (STRING_MULTIBYTE (text) | ||
| 5175 | ? Fstring_as_unibyte (text) | ||
| 5176 | : Fstring_to_multibyte (text)); | ||
| 5177 | if (SBYTES (text) > 0) | 5162 | if (SBYTES (text) > 0) |
| 5178 | internal_condition_case_1 (read_process_output_call, | 5163 | internal_condition_case_1 (read_process_output_call, |
| 5179 | Fcons (outstream, | 5164 | Fcons (outstream, |
| @@ -6834,7 +6819,8 @@ suppressed. */) | |||
| 6834 | 6819 | ||
| 6835 | CHECK_PROCESS (process); | 6820 | CHECK_PROCESS (process); |
| 6836 | p = XPROCESS (process); | 6821 | p = XPROCESS (process); |
| 6837 | p->filter_multibyte = !NILP (flag); | 6822 | if (NILP (flag)) |
| 6823 | p->decode_coding_system = raw_text_coding_system (p->decode_coding_system); | ||
| 6838 | setup_process_coding_systems (process); | 6824 | setup_process_coding_systems (process); |
| 6839 | 6825 | ||
| 6840 | return Qnil; | 6826 | return Qnil; |
| @@ -6847,11 +6833,12 @@ DEFUN ("process-filter-multibyte-p", Fprocess_filter_multibyte_p, | |||
| 6847 | Lisp_Object process; | 6833 | Lisp_Object process; |
| 6848 | { | 6834 | { |
| 6849 | register struct Lisp_Process *p; | 6835 | register struct Lisp_Process *p; |
| 6836 | struct coding_system *coding; | ||
| 6850 | 6837 | ||
| 6851 | CHECK_PROCESS (process); | 6838 | CHECK_PROCESS (process); |
| 6852 | p = XPROCESS (process); | 6839 | p = XPROCESS (process); |
| 6853 | 6840 | coding = proc_decode_coding_system[p->infd]; | |
| 6854 | return (p->filter_multibyte ? Qt : Qnil); | 6841 | return (CODING_FOR_UNIBYTE (coding) ? Qnil : Qt); |
| 6855 | } | 6842 | } |
| 6856 | 6843 | ||
| 6857 | 6844 | ||
| @@ -7109,8 +7096,6 @@ syms_of_process () | |||
| 7109 | staticpro (&QCoptions); | 7096 | staticpro (&QCoptions); |
| 7110 | QCplist = intern (":plist"); | 7097 | QCplist = intern (":plist"); |
| 7111 | staticpro (&QCplist); | 7098 | staticpro (&QCplist); |
| 7112 | QCfilter_multibyte = intern (":filter-multibyte"); | ||
| 7113 | staticpro (&QCfilter_multibyte); | ||
| 7114 | 7099 | ||
| 7115 | Qlast_nonmenu_event = intern ("last-nonmenu-event"); | 7100 | Qlast_nonmenu_event = intern ("last-nonmenu-event"); |
| 7116 | staticpro (&Qlast_nonmenu_event); | 7101 | staticpro (&Qlast_nonmenu_event); |