Mercurial > emacs
diff src/alloc.c @ 648:70b112526394
*** empty log message ***
| author | Jim Blandy <jimb@redhat.com> |
|---|---|
| date | Mon, 18 May 1992 08:14:41 +0000 |
| parents | 40b255f55df3 |
| children | 540b047ece4d |
line wrap: on
line diff
--- a/src/alloc.c Mon May 18 08:13:37 1992 +0000 +++ b/src/alloc.c Mon May 18 08:14:41 1992 +0000 @@ -1077,15 +1077,21 @@ 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; } }
