216 |
int nargs; |
int nargs; |
217 |
register Lisp_Object *args; |
register Lisp_Object *args; |
218 |
{ |
{ |
219 |
Lisp_Object infile, buffer, current_dir, display, path; |
Lisp_Object infile, buffer, current_dir, path; |
220 |
|
int display_p; |
221 |
int fd[2]; |
int fd[2]; |
222 |
int filefd; |
int filefd; |
223 |
register int pid; |
register int pid; |
373 |
UNGCPRO; |
UNGCPRO; |
374 |
} |
} |
375 |
|
|
376 |
display = nargs >= 4 ? args[3] : Qnil; |
display_p = INTERACTIVE && nargs >= 4 && !NILP (args[3]); |
377 |
|
|
378 |
filefd = emacs_open (SDATA (infile), O_RDONLY, 0); |
filefd = emacs_open (SDATA (infile), O_RDONLY, 0); |
379 |
if (filefd < 0) |
if (filefd < 0) |
740 |
int first = 1; |
int first = 1; |
741 |
int total_read = 0; |
int total_read = 0; |
742 |
int carryover = 0; |
int carryover = 0; |
743 |
int display_on_the_fly = !NILP (display) && INTERACTIVE; |
int display_on_the_fly = display_p; |
744 |
struct coding_system saved_coding; |
struct coding_system saved_coding; |
745 |
|
|
746 |
saved_coding = process_coding; |
saved_coding = process_coding; |
804 |
display_on_the_fly = 0; |
display_on_the_fly = 0; |
805 |
process_coding = saved_coding; |
process_coding = saved_coding; |
806 |
carryover = nread; |
carryover = nread; |
807 |
|
/* This is to make the above condition always |
808 |
|
fails in the future. */ |
809 |
|
saved_coding.type = coding_type_no_conversion; |
810 |
continue; |
continue; |
811 |
} |
} |
812 |
|
|
836 |
bufptr = tempptr; |
bufptr = tempptr; |
837 |
} |
} |
838 |
|
|
839 |
if (!NILP (display) && INTERACTIVE) |
if (display_p) |
840 |
{ |
{ |
841 |
if (first) |
if (first) |
842 |
prepare_menu_bars (); |
prepare_menu_bars (); |
843 |
first = 0; |
first = 0; |
844 |
redisplay_preserve_echo_area (1); |
redisplay_preserve_echo_area (1); |
845 |
|
/* This variable might have been set to 0 for code |
846 |
|
detection. In that case, we set it back to 1 because |
847 |
|
we should have already detected a coding system. */ |
848 |
|
display_on_the_fly = 1; |
849 |
} |
} |
850 |
immediate_quit = 1; |
immediate_quit = 1; |
851 |
QUIT; |
QUIT; |