]> code.delx.au - gnu-emacs/commitdiff
Limit the undo actions to 100 actions by Lars Magne Ingebrigtsen <larsi@gnus.org>.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 30 Aug 2010 23:47:12 +0000 (23:47 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 30 Aug 2010 23:47:12 +0000 (23:47 +0000)
lisp/gnus/ChangeLog
lisp/gnus/gnus-undo.el

index 991a9910e7fec3c0197e6d8e1cb696721661f9af..19160dc8faf1f931ad41d9923bdf5febb9832692 100644 (file)
@@ -1,5 +1,8 @@
 2010-08-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-undo.el (gnus-undo-register-1): Limit the undo actions to 100
+       actions.
+
        * gnus-group.el (gnus-group-completing-read): Protect against not
        having completion-styles bound.
 
index d11b778f3514f025c85effae1137c942b161a636..802ae63caa4ca7b866b83075704ee3343160fa0b 100644 (file)
@@ -154,6 +154,9 @@ FORMS may use backtick quote syntax."
      ;; We are on a boundary, so we create a new action.
      (gnus-undo-boundary
       (push (list function) gnus-undo-actions)
+      ;; Don't let the undo actions grow infinitely.
+      (when (> (length gnus-undo-actions) 100)
+       (setcdr (nthcdr 100 gnus-undo-actions) nil))
       (setq gnus-undo-boundary nil))
      ;; Prepend the function to an old action.
      (gnus-undo-actions