# HG changeset patch # User Katsumi Yamaoka # Date 1283212032 0 # Node ID c47359d0e31aa3eee22f4878e58da1c6b684eeb5 # Parent d8ded88bb148ca8f24183f8df5af973bfb70eb66 Limit the undo actions to 100 actions by Lars Magne Ingebrigtsen . diff -r d8ded88bb148 -r c47359d0e31a lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Mon Aug 30 23:40:10 2010 +0000 +++ b/lisp/gnus/ChangeLog Mon Aug 30 23:47:12 2010 +0000 @@ -1,5 +1,8 @@ 2010-08-30 Lars Magne Ingebrigtsen + * 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. diff -r d8ded88bb148 -r c47359d0e31a lisp/gnus/gnus-undo.el --- a/lisp/gnus/gnus-undo.el Mon Aug 30 23:40:10 2010 +0000 +++ b/lisp/gnus/gnus-undo.el Mon Aug 30 23:47:12 2010 +0000 @@ -154,6 +154,9 @@ ;; 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