diff options
| author | Karoly Lorentey | 2007-04-22 12:12:29 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2007-04-22 12:12:29 +0000 |
| commit | e18c709364b095ea0be8ecabe458ac9a642a252f (patch) | |
| tree | efe814a842f932f387b3947c572bf43a548d17ef /src/lread.c | |
| parent | 81088e260b086fe28f36964f32b6338210ec6fd8 (diff) | |
| parent | 9f25e707aaad5ed14a9448e9c5d345ff0bdbc5a7 (diff) | |
| download | emacs-e18c709364b095ea0be8ecabe458ac9a642a252f.tar.gz emacs-e18c709364b095ea0be8ecabe458ac9a642a252f.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-660
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-661
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-662
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-663
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-664
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-665
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-666
Fix read-only prompt problem in isearch
* emacs@sv.gnu.org/emacs--devo--0--patch-667
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-668
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-669
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-670
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-671
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-672
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-673
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-206
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-207
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-208
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-600
Diffstat (limited to 'src/lread.c')
| -rw-r--r-- | src/lread.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/lread.c b/src/lread.c index f1671c4543c..cee6cf5a92e 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -38,6 +38,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 38 | #include "frame.h" | 38 | #include "frame.h" |
| 39 | #include "termhooks.h" | 39 | #include "termhooks.h" |
| 40 | #include "coding.h" | 40 | #include "coding.h" |
| 41 | #include "blockinput.h" | ||
| 41 | 42 | ||
| 42 | #ifdef lint | 43 | #ifdef lint |
| 43 | #include <sys/inode.h> | 44 | #include <sys/inode.h> |
| @@ -326,14 +327,18 @@ readchar (readcharfun) | |||
| 326 | 327 | ||
| 327 | if (EQ (readcharfun, Qget_file_char)) | 328 | if (EQ (readcharfun, Qget_file_char)) |
| 328 | { | 329 | { |
| 330 | BLOCK_INPUT; | ||
| 329 | c = getc (instream); | 331 | c = getc (instream); |
| 332 | UNBLOCK_INPUT; | ||
| 330 | #ifdef EINTR | 333 | #ifdef EINTR |
| 331 | /* Interrupted reads have been observed while reading over the network */ | 334 | /* Interrupted reads have been observed while reading over the network */ |
| 332 | while (c == EOF && ferror (instream) && errno == EINTR) | 335 | while (c == EOF && ferror (instream) && errno == EINTR) |
| 333 | { | 336 | { |
| 334 | QUIT; | 337 | QUIT; |
| 335 | clearerr (instream); | 338 | clearerr (instream); |
| 339 | BLOCK_INPUT; | ||
| 336 | c = getc (instream); | 340 | c = getc (instream); |
| 341 | UNBLOCK_INPUT; | ||
| 337 | } | 342 | } |
| 338 | #endif | 343 | #endif |
| 339 | return c; | 344 | return c; |
| @@ -416,7 +421,11 @@ unreadchar (readcharfun, c) | |||
| 416 | else if (EQ (readcharfun, Qlambda)) | 421 | else if (EQ (readcharfun, Qlambda)) |
| 417 | read_bytecode_char (1); | 422 | read_bytecode_char (1); |
| 418 | else if (EQ (readcharfun, Qget_file_char)) | 423 | else if (EQ (readcharfun, Qget_file_char)) |
| 419 | ungetc (c, instream); | 424 | { |
| 425 | BLOCK_INPUT; | ||
| 426 | ungetc (c, instream); | ||
| 427 | UNBLOCK_INPUT; | ||
| 428 | } | ||
| 420 | else | 429 | else |
| 421 | call1 (readcharfun, make_number (c)); | 430 | call1 (readcharfun, make_number (c)); |
| 422 | } | 431 | } |
| @@ -627,7 +636,9 @@ DEFUN ("get-file-char", Fget_file_char, Sget_file_char, 0, 0, 0, | |||
| 627 | () | 636 | () |
| 628 | { | 637 | { |
| 629 | register Lisp_Object val; | 638 | register Lisp_Object val; |
| 639 | BLOCK_INPUT; | ||
| 630 | XSETINT (val, getc (instream)); | 640 | XSETINT (val, getc (instream)); |
| 641 | UNBLOCK_INPUT; | ||
| 631 | return val; | 642 | return val; |
| 632 | } | 643 | } |
| 633 | 644 | ||
| @@ -1046,7 +1057,11 @@ load_unwind (arg) /* used as unwind-protect function in load */ | |||
| 1046 | { | 1057 | { |
| 1047 | FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; | 1058 | FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; |
| 1048 | if (stream != NULL) | 1059 | if (stream != NULL) |
| 1049 | fclose (stream); | 1060 | { |
| 1061 | BLOCK_INPUT; | ||
| 1062 | fclose (stream); | ||
| 1063 | UNBLOCK_INPUT; | ||
| 1064 | } | ||
| 1050 | if (--load_in_progress < 0) load_in_progress = 0; | 1065 | if (--load_in_progress < 0) load_in_progress = 0; |
| 1051 | return Qnil; | 1066 | return Qnil; |
| 1052 | } | 1067 | } |