aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatsumi Yamaoka2010-08-30 23:47:12 +0000
committerKatsumi Yamaoka2010-08-30 23:47:12 +0000
commit75856ec0cbcd53214b96c36f2c0ee391b061c912 (patch)
treee24e24e7531b1f1f1405d04f6316d17c9225b26e
parent0be02d8a41dae178ba6d8c80a4839fa02f3ec4d8 (diff)
downloademacs-75856ec0cbcd53214b96c36f2c0ee391b061c912.tar.gz
emacs-75856ec0cbcd53214b96c36f2c0ee391b061c912.zip
Limit the undo actions to 100 actions by Lars Magne Ingebrigtsen <larsi@gnus.org>.
-rw-r--r--lisp/gnus/ChangeLog3
-rw-r--r--lisp/gnus/gnus-undo.el3
2 files changed, 6 insertions, 0 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 991a9910e7f..19160dc8faf 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,5 +1,8 @@
12010-08-30 Lars Magne Ingebrigtsen <larsi@gnus.org> 12010-08-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 2
3 * gnus-undo.el (gnus-undo-register-1): Limit the undo actions to 100
4 actions.
5
3 * gnus-group.el (gnus-group-completing-read): Protect against not 6 * gnus-group.el (gnus-group-completing-read): Protect against not
4 having completion-styles bound. 7 having completion-styles bound.
5 8
diff --git a/lisp/gnus/gnus-undo.el b/lisp/gnus/gnus-undo.el
index d11b778f351..802ae63caa4 100644
--- a/lisp/gnus/gnus-undo.el
+++ b/lisp/gnus/gnus-undo.el
@@ -154,6 +154,9 @@ FORMS may use backtick quote syntax."
154 ;; We are on a boundary, so we create a new action. 154 ;; We are on a boundary, so we create a new action.
155 (gnus-undo-boundary 155 (gnus-undo-boundary
156 (push (list function) gnus-undo-actions) 156 (push (list function) gnus-undo-actions)
157 ;; Don't let the undo actions grow infinitely.
158 (when (> (length gnus-undo-actions) 100)
159 (setcdr (nthcdr 100 gnus-undo-actions) nil))
157 (setq gnus-undo-boundary nil)) 160 (setq gnus-undo-boundary nil))
158 ;; Prepend the function to an old action. 161 ;; Prepend the function to an old action.
159 (gnus-undo-actions 162 (gnus-undo-actions