Mercurial > emacs
comparison src/callproc.c @ 18182:967f92654591
(Fcall_process): Pay attention to
Vdefault_process_coding_system.
(Fcall_process_region): Likewise.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 09 Jun 1997 12:59:22 +0000 |
parents | 19b17b4f765d |
children | 43ce16d5f31e |
comparison
equal
deleted
inserted
replaced
18181:1d91f0e4ff7d | 18182:967f92654591 |
---|---|
249 { | 249 { |
250 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); | 250 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); |
251 args2[0] = Qcall_process; | 251 args2[0] = Qcall_process; |
252 for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; | 252 for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; |
253 coding_systems = Ffind_coding_system (nargs + 1, args2); | 253 coding_systems = Ffind_coding_system (nargs + 1, args2); |
254 val = CONSP (coding_systems) ? XCONS (coding_systems)->cdr : Qnil; | 254 if (CONSP (coding_systems)) |
255 val = XCONS (coding_systems)->cdr; | |
256 else if (CONSP (Vdefault_process_coding_system)) | |
257 val = XCONS (Vdefault_process_coding_system)->cdr; | |
255 } | 258 } |
256 setup_coding_system (Fcheck_coding_system (val), &argument_coding); | 259 setup_coding_system (Fcheck_coding_system (val), &argument_coding); |
257 } | 260 } |
258 | 261 |
259 /* If BUFFER is nil, we must read process output once and then | 262 /* If BUFFER is nil, we must read process output once and then |
270 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); | 273 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); |
271 args2[0] = Qcall_process; | 274 args2[0] = Qcall_process; |
272 for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; | 275 for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; |
273 coding_systems = Ffind_coding_system (nargs + 1, args2); | 276 coding_systems = Ffind_coding_system (nargs + 1, args2); |
274 } | 277 } |
275 val = CONSP (coding_systems) ? XCONS (coding_systems)->car : Qnil; | 278 if (CONSP (coding_systems)) |
279 val = XCONS (coding_systems)->car; | |
280 else if (CONSP (Vdefault_process_coding_system)) | |
281 val = XCONS (Vdefault_process_coding_system)->car; | |
276 } | 282 } |
277 setup_coding_system (Fcheck_coding_system (val), &process_coding); | 283 setup_coding_system (Fcheck_coding_system (val), &process_coding); |
278 } | 284 } |
279 } | 285 } |
280 | 286 |
773 { | 779 { |
774 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); | 780 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); |
775 args2[0] = Qcall_process_region; | 781 args2[0] = Qcall_process_region; |
776 for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; | 782 for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; |
777 coding_systems = Ffind_coding_system (nargs + 1, args2); | 783 coding_systems = Ffind_coding_system (nargs + 1, args2); |
778 val = CONSP (coding_systems) ? XCONS (coding_systems)->cdr : Qnil; | 784 if (CONSP (coding_systems)) |
785 val = XCONS (coding_systems)->cdr; | |
786 else if (CONSP (Vdefault_process_coding_system)) | |
787 val = XCONS (Vdefault_process_coding_system)->car; | |
779 } | 788 } |
780 specbind (intern ("coding-system-for-write"), val); | 789 specbind (intern ("coding-system-for-write"), val); |
781 Fwrite_region (start, end, filename_string, Qnil, Qlambda, Qnil, Qnil); | 790 Fwrite_region (start, end, filename_string, Qnil, Qlambda, Qnil); |
782 | 791 |
783 #ifdef DOS_NT | 792 #ifdef DOS_NT |
784 if (NILP (Vbinary_process_input)) | 793 if (NILP (Vbinary_process_input)) |
785 val = Qnil; | 794 val = Qnil; |
786 else | 795 else |