diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c index 9b7da1d0f5b..9c63f8fe132 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1077,15 +1077,21 @@ Garbage collection happens automatically if you cons more than\n\ | |||
| 1077 | tem = Fnthcdr (make_number (30), Vcommand_history); | 1077 | tem = Fnthcdr (make_number (30), Vcommand_history); |
| 1078 | if (CONSP (tem)) | 1078 | if (CONSP (tem)) |
| 1079 | XCONS (tem)->cdr = Qnil; | 1079 | XCONS (tem)->cdr = Qnil; |
| 1080 | |||
| 1080 | /* Likewise for undo information. */ | 1081 | /* Likewise for undo information. */ |
| 1081 | { | 1082 | { |
| 1082 | register struct buffer *nextb = all_buffers; | 1083 | register struct buffer *nextb = all_buffers; |
| 1083 | 1084 | ||
| 1084 | while (nextb) | 1085 | while (nextb) |
| 1085 | { | 1086 | { |
| 1086 | nextb->undo_list | 1087 | /* If a buffer's undo list is Qt, that means that undo is |
| 1087 | = truncate_undo_list (nextb->undo_list, undo_threshold, | 1088 | turned off in that buffer. Calling truncate_undo_list on |
| 1088 | undo_high_threshold); | 1089 | Qt tends to return NULL, which effectively turns undo back on. |
| 1090 | So don't call truncate_undo_list if undo_list is Qt. */ | ||
| 1091 | if (! EQ (nextb->undo_list, Qt)) | ||
| 1092 | nextb->undo_list | ||
| 1093 | = truncate_undo_list (nextb->undo_list, undo_threshold, | ||
| 1094 | undo_high_threshold); | ||
| 1089 | nextb = nextb->next; | 1095 | nextb = nextb->next; |
| 1090 | } | 1096 | } |
| 1091 | } | 1097 | } |