diff options
| author | Richard M. Stallman | 1995-11-10 15:54:33 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-11-10 15:54:33 +0000 |
| commit | 118d6ca9bb232571c23149140706cb80ac5f2f3c (patch) | |
| tree | 026b63702ba27098a829866a89c48abee514526a /src | |
| parent | 55f7a32bb85ab1bccb40f5d646ecacf8582710ca (diff) | |
| download | emacs-118d6ca9bb232571c23149140706cb80ac5f2f3c.tar.gz emacs-118d6ca9bb232571c23149140706cb80ac5f2f3c.zip | |
(interrupt_signal): Do special things in GC.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 8c782b65e20..ee31c02f478 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -6949,18 +6949,35 @@ interrupt_signal (signalnum) /* If we don't have an argument, */ | |||
| 6949 | is used. Note that [Enter] is not echoed by dos. */ | 6949 | is used. Note that [Enter] is not echoed by dos. */ |
| 6950 | cursor_to (0, 0); | 6950 | cursor_to (0, 0); |
| 6951 | #endif | 6951 | #endif |
| 6952 | printf ("Auto-save? (y or n) "); | 6952 | /* It doesn't work to autosave while GC is in progress; |
| 6953 | fflush (stdout); | 6953 | the code used for auto-saving doesn't cope with the mark bit. */ |
| 6954 | if (((c = getchar ()) & ~040) == 'Y') | 6954 | if (!gc_in_progress) |
| 6955 | { | 6955 | { |
| 6956 | Fdo_auto_save (Qt, Qnil); | 6956 | printf ("Auto-save? (y or n) "); |
| 6957 | fflush (stdout); | ||
| 6958 | if (((c = getchar ()) & ~040) == 'Y') | ||
| 6959 | { | ||
| 6960 | Fdo_auto_save (Qt, Qnil); | ||
| 6957 | #ifdef MSDOS | 6961 | #ifdef MSDOS |
| 6958 | printf ("\r\nAuto-save done"); | 6962 | printf ("\r\nAuto-save done"); |
| 6959 | #else /* not MSDOS */ | 6963 | #else /* not MSDOS */ |
| 6960 | printf ("Auto-save done\n"); | 6964 | printf ("Auto-save done\n"); |
| 6961 | #endif /* not MSDOS */ | 6965 | #endif /* not MSDOS */ |
| 6966 | } | ||
| 6967 | while (c != '\n') c = getchar (); | ||
| 6962 | } | 6968 | } |
| 6963 | while (c != '\n') c = getchar (); | 6969 | else |
| 6970 | { | ||
| 6971 | /* During GC, it must be safe to reenable quitting again. */ | ||
| 6972 | Vinhibit_quit = Qnil; | ||
| 6973 | #ifdef MSDOS | ||
| 6974 | printf ("\r\n"); | ||
| 6975 | #endif /* not MSDOS */ | ||
| 6976 | printf ("Garbage collection in progress; cannot auto-save now\r\n"); | ||
| 6977 | printf ("but will instead do a real quit after garbage collection ends\r\n"); | ||
| 6978 | fflush (stdout); | ||
| 6979 | } | ||
| 6980 | |||
| 6964 | #ifdef MSDOS | 6981 | #ifdef MSDOS |
| 6965 | printf ("\r\nAbort? (y or n) "); | 6982 | printf ("\r\nAbort? (y or n) "); |
| 6966 | #else /* not MSDOS */ | 6983 | #else /* not MSDOS */ |