diff options
author | Jim Blandy <jimb@redhat.com> | 1992-05-18 08:14:41 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1992-05-18 08:14:41 +0000 |
commit | ffd56f97cf56501f7a6981c184192e9043e4eafd (patch) | |
tree | d463f4585c85fa76b33d3663271bbb4126d7b116 /src/alloc.c | |
parent | 502ddf238f0ed280a301426804b2ed16ec1c49cc (diff) | |
download | emacs-ffd56f97cf56501f7a6981c184192e9043e4eafd.tar.gz emacs-ffd56f97cf56501f7a6981c184192e9043e4eafd.tar.bz2 emacs-ffd56f97cf56501f7a6981c184192e9043e4eafd.zip |
*** empty log message ***
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\ 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; } } |