From ffd56f97cf56501f7a6981c184192e9043e4eafd Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Mon, 18 May 1992 08:14:41 +0000 Subject: *** empty log message *** --- src/alloc.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/alloc.c') 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\ tem = Fnthcdr (make_number (30), Vcommand_history); if (CONSP (tem)) XCONS (tem)->cdr = Qnil; + /* Likewise for undo information. */ { register struct buffer *nextb = all_buffers; while (nextb) { - nextb->undo_list - = truncate_undo_list (nextb->undo_list, undo_threshold, - undo_high_threshold); + /* If a buffer's undo list is Qt, that means that undo is + turned off in that buffer. Calling truncate_undo_list on + Qt tends to return NULL, which effectively turns undo back on. + So don't call truncate_undo_list if undo_list is Qt. */ + if (! EQ (nextb->undo_list, Qt)) + nextb->undo_list + = truncate_undo_list (nextb->undo_list, undo_threshold, + undo_high_threshold); nextb = nextb->next; } } -- cgit v1.2.1