X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/292203c9ef2ab5c1bb349b83132c9a51d3dfb274..af6ea8ad8d62810d901561ae4a56d89f22ebacf0:/src/callproc.c diff --git a/src/callproc.c b/src/callproc.c index 54ebf53979..d8eebac08a 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -203,6 +203,10 @@ t (mix it with ordinary output), or a file name string. Fourth arg DISPLAY non-nil means redisplay buffer as output is inserted. Remaining arguments are strings passed as command arguments to PROGRAM. +If executable PROGRAM can't be found as an executable, `call-process' +signals a Lisp error. `call-process' reports errors in execution of +the program only through its return and output. + If BUFFER is 0, `call-process' returns immediately with value nil. Otherwise it waits for PROGRAM to terminate and returns a numeric exit status or a signal description string. @@ -269,6 +273,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) if (nargs >= 5) { int must_encode = 0; + Lisp_Object coding_attrs; for (i = 4; i < nargs; i++) CHECK_STRING (args[i]); @@ -294,7 +299,15 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) else val = Qnil; } + val = coding_inherit_eol_type (val, Qnil); setup_coding_system (Fcheck_coding_system (val), &argument_coding); + coding_attrs = CODING_ID_ATTRS (argument_coding.id); + if (NILP (CODING_ATTR_ASCII_COMPAT (coding_attrs))) + { + /* We should not use an ASCII incompatible coding system. */ + val = raw_text_coding_system (val); + setup_coding_system (val, &argument_coding); + } } }