emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101230: Limit the undo actions to 10


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101230: Limit the undo actions to 100 actions by Lars Magne Ingebrigtsen <address@hidden>.
Date: Mon, 30 Aug 2010 23:47:12 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101230
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Mon 2010-08-30 23:47:12 +0000
message:
  Limit the undo actions to 100 actions by Lars Magne Ingebrigtsen 
<address@hidden>.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-undo.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2010-08-30 23:40:10 +0000
+++ b/lisp/gnus/ChangeLog       2010-08-30 23:47:12 +0000
@@ -1,5 +1,8 @@
 2010-08-30  Lars Magne Ingebrigtsen  <address@hidden>
 
+       * 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.
 

=== modified file 'lisp/gnus/gnus-undo.el'
--- a/lisp/gnus/gnus-undo.el    2010-05-06 04:15:34 +0000
+++ b/lisp/gnus/gnus-undo.el    2010-08-30 23:47:12 +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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]