diff options
author | Richard M. Stallman <[email protected]> | 1998-06-23 03:07:05 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 1998-06-23 03:07:05 +0000 |
commit | 3ffde7d6913260ec054fa8711ddb8186632addd2 (patch) | |
tree | a85993e2c3a1ad0c753b0f8ffbfd1db6e14d5dd4 /src | |
parent | b274c3ad1fe7a9f931f8e7af819a330cd3744367 (diff) |
(Fcall_process): Handle third argument BUFFER
consistently when it is an integer or a list.
Diffstat (limited to 'src')
-rw-r--r-- | src/callproc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/callproc.c b/src/callproc.c index a49da6dde3..a76db5ba4b 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -227,7 +227,8 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") #ifndef subprocesses /* Without asynchronous processes we cannot have BUFFER == 0. */ - if (nargs >= 3 && INTEGERP (args[2])) + if (nargs >= 3 + && (INTEGERP (CONSP (args[2]) ? XCAR (args[2]) : args[2]) error ("Operating system cannot handle asynchronous subprocesses"); #endif /* subprocesses */ @@ -271,9 +272,10 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") /* If BUFFER is nil, we must read process output once and then discard it, so setup coding system but with nil. If BUFFER is an integer, we can discard it without reading. */ - if (nargs < 3 || NILP (args[2])) + if (nargs < 3 || NILP (args[2]) + || (CONSP (args[2]) && NILP (XCAR (args[2])))) setup_coding_system (Qnil, &process_coding); - else if (!INTEGERP (args[2])) + else if (!INTEGERP (CONSP (args[2]) ? XCAR (args[2]) : args[2])) { val = Qnil; if (!NILP (Vcoding_system_for_read)) @@ -333,7 +335,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") if (!(EQ (buffer, Qnil) || EQ (buffer, Qt) - || XFASTINT (buffer) == 0)) + || INTEGERP (buffer))) { Lisp_Object spec_buffer; spec_buffer = buffer; |