# HG changeset patch # User Richard M. Stallman # Date 898571225 0 # Node ID 4ec5c343db1f6dfc56cc73e96bbb4b9de6b0c820 # Parent bb42066bb94a875afb11c34908a24d3510157cce (Fcall_process): Handle third argument BUFFER consistently when it is an integer or a list. diff -r bb42066bb94a -r 4ec5c343db1f src/callproc.c --- a/src/callproc.c Tue Jun 23 01:55:31 1998 +0000 +++ b/src/callproc.c Tue Jun 23 03:07:05 1998 +0000 @@ -227,7 +227,8 @@ #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 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 (!(EQ (buffer, Qnil) || EQ (buffer, Qt) - || XFASTINT (buffer) == 0)) + || INTEGERP (buffer))) { Lisp_Object spec_buffer; spec_buffer = buffer;