emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 r116951: * simple.el (undo): Prevent insertion of


From: Barry O'Reilly
Subject: [Emacs-diffs] emacs-24 r116951: * simple.el (undo): Prevent insertion of identity mapping into
Date: Sat, 12 Apr 2014 19:21:56 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116951
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17236
committer: Barry O'Reilly <address@hidden>
branch nick: emacs-24
timestamp: Sat 2014-04-12 15:20:44 -0400
message:
  * simple.el (undo): Prevent insertion of identity mapping into
  undo-equiv-table so as undo-only does not inf loop in the presence
  of consecutive nils in undo list.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/simple.el                 simple.el-20091113204419-o5vbwnq5f7feedwu-403
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-04-12 14:31:48 +0000
+++ b/lisp/ChangeLog    2014-04-12 19:20:44 +0000
@@ -1,3 +1,9 @@
+2014-04-12  Barry O'Reilly  <address@hidden>
+
+       * simple.el (undo): Prevent insertion of identity mapping into
+       undo-equiv-table so as undo-only does not inf loop in the presence
+       of consecutive nils in undo list.
+
 2014-04-12  Matthias Dahl  <address@hidden>
 
        * faces.el (make-face): Deprecate optional argument as it is no

=== modified file 'lisp/simple.el'
--- a/lisp/simple.el    2014-04-02 06:53:10 +0000
+++ b/lisp/simple.el    2014-04-12 19:20:44 +0000
@@ -2143,7 +2143,12 @@
       ;; above when checking.
       (while (eq (car list) nil)
        (setq list (cdr list)))
-      (puthash list (if undo-in-region t pending-undo-list)
+      (puthash list
+               ;; Prevent identity mapping.  This can happen if
+               ;; consecutive nils are erroneously in undo list.
+               (if (or undo-in-region (eq list pending-undo-list))
+                   t
+                 pending-undo-list)
               undo-equiv-table))
     ;; Don't specify a position in the undo record for the undo command.
     ;; Instead, undoing this should move point to where the change is.


reply via email to

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