diff options
author | Miles Bader <miles@gnu.org> | 2004-10-14 08:50:09 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2004-10-14 08:50:09 +0000 |
commit | 91900dd736dc0ab57a38da1fa9daa5ddde487bfb (patch) | |
tree | f592b350cad8a3a6bd196722bb553469c5781c1a /src/callproc.c | |
parent | 2beba76dd5f6e3f1fcf9cba8b66e465ae9e20519 (diff) | |
parent | ebbeed623cb9902e520fc67d6d271e222e16867f (diff) | |
download | emacs-91900dd736dc0ab57a38da1fa9daa5ddde487bfb.tar.gz emacs-91900dd736dc0ab57a38da1fa9daa5ddde487bfb.tar.bz2 emacs-91900dd736dc0ab57a38da1fa9daa5ddde487bfb.zip |
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-57
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-594
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-598
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-599
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-600
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-602
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-603
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-604
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-609
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-610
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-611
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-614
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-615
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-42
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-43
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-44
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-46
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-47
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-48
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-49
Add {arch}/=commit-merge-make-log
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-50
{arch}/=commit-merge-make-log: Don't die if there are no ChangeLog changes
Diffstat (limited to 'src/callproc.c')
-rw-r--r-- | src/callproc.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/callproc.c b/src/callproc.c index 7632d491944..d9f9a342575 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -216,7 +216,8 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) int nargs; register Lisp_Object *args; { - Lisp_Object infile, buffer, current_dir, display, path; + Lisp_Object infile, buffer, current_dir, path; + int display_p; int fd[2]; int filefd; register int pid; @@ -372,7 +373,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) UNGCPRO; } - display = nargs >= 4 ? args[3] : Qnil; + display_p = INTERACTIVE && nargs >= 4 && !NILP (args[3]); filefd = emacs_open (SDATA (infile), O_RDONLY, 0); if (filefd < 0) @@ -739,7 +740,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) int first = 1; int total_read = 0; int carryover = 0; - int display_on_the_fly = !NILP (display) && INTERACTIVE; + int display_on_the_fly = display_p; struct coding_system saved_coding; saved_coding = process_coding; @@ -803,6 +804,9 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) display_on_the_fly = 0; process_coding = saved_coding; carryover = nread; + /* This is to make the above condition always + fails in the future. */ + saved_coding.type = coding_type_no_conversion; continue; } @@ -832,12 +836,16 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) bufptr = tempptr; } - if (!NILP (display) && INTERACTIVE) + if (display_p) { if (first) prepare_menu_bars (); first = 0; redisplay_preserve_echo_area (1); + /* This variable might have been set to 0 for code + detection. In that case, we set it back to 1 because + we should have already detected a coding system. */ + display_on_the_fly = 1; } immediate_quit = 1; QUIT; |