Mercurial > emacs
changeset 110043:c47359d0e31a
Limit the undo actions to 100 actions by Lars Magne Ingebrigtsen <larsi@gnus.org>.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Mon, 30 Aug 2010 23:47:12 +0000 |
parents | d8ded88bb148 |
children | a53fffd298ac |
files | lisp/gnus/ChangeLog lisp/gnus/gnus-undo.el |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 <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.
--- 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