diff options
| author | Richard M. Stallman | 1998-06-23 03:07:05 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-06-23 03:07:05 +0000 |
| commit | 3ffde7d6913260ec054fa8711ddb8186632addd2 (patch) | |
| tree | a85993e2c3a1ad0c753b0f8ffbfd1db6e14d5dd4 /src/callproc.c | |
| parent | b274c3ad1fe7a9f931f8e7af819a330cd3744367 (diff) | |
| download | emacs-3ffde7d6913260ec054fa8711ddb8186632addd2.tar.gz emacs-3ffde7d6913260ec054fa8711ddb8186632addd2.zip | |
(Fcall_process): Handle third argument BUFFER
consistently when it is an integer or a list.
Diffstat (limited to 'src/callproc.c')
| -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 a49da6dde3c..a76db5ba4b1 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.") | |||
| 227 | 227 | ||
| 228 | #ifndef subprocesses | 228 | #ifndef subprocesses |
| 229 | /* Without asynchronous processes we cannot have BUFFER == 0. */ | 229 | /* Without asynchronous processes we cannot have BUFFER == 0. */ |
| 230 | if (nargs >= 3 && INTEGERP (args[2])) | 230 | if (nargs >= 3 |
| 231 | && (INTEGERP (CONSP (args[2]) ? XCAR (args[2]) : args[2]) | ||
| 231 | error ("Operating system cannot handle asynchronous subprocesses"); | 232 | error ("Operating system cannot handle asynchronous subprocesses"); |
| 232 | #endif /* subprocesses */ | 233 | #endif /* subprocesses */ |
| 233 | 234 | ||
| @@ -271,9 +272,10 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") | |||
| 271 | /* If BUFFER is nil, we must read process output once and then | 272 | /* If BUFFER is nil, we must read process output once and then |
| 272 | discard it, so setup coding system but with nil. If BUFFER is | 273 | discard it, so setup coding system but with nil. If BUFFER is |
| 273 | an integer, we can discard it without reading. */ | 274 | an integer, we can discard it without reading. */ |
| 274 | if (nargs < 3 || NILP (args[2])) | 275 | if (nargs < 3 || NILP (args[2]) |
| 276 | || (CONSP (args[2]) && NILP (XCAR (args[2])))) | ||
| 275 | setup_coding_system (Qnil, &process_coding); | 277 | setup_coding_system (Qnil, &process_coding); |
| 276 | else if (!INTEGERP (args[2])) | 278 | else if (!INTEGERP (CONSP (args[2]) ? XCAR (args[2]) : args[2])) |
| 277 | { | 279 | { |
| 278 | val = Qnil; | 280 | val = Qnil; |
| 279 | if (!NILP (Vcoding_system_for_read)) | 281 | 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.") | |||
| 333 | 335 | ||
| 334 | if (!(EQ (buffer, Qnil) | 336 | if (!(EQ (buffer, Qnil) |
| 335 | || EQ (buffer, Qt) | 337 | || EQ (buffer, Qt) |
| 336 | || XFASTINT (buffer) == 0)) | 338 | || INTEGERP (buffer))) |
| 337 | { | 339 | { |
| 338 | Lisp_Object spec_buffer; | 340 | Lisp_Object spec_buffer; |
| 339 | spec_buffer = buffer; | 341 | spec_buffer = buffer; |