aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorBarry O'Reilly2014-04-12 15:20:44 -0400
committerBarry O'Reilly2014-04-12 15:20:44 -0400
commit175a3a5144ab17bc8c854cd0cc6c1771d79a9f9c (patch)
treed69a008e3b6eb0e17b82db1b1f5a2eb407baf529 /lisp
parent5121b6923beb2fb62b179b4a95b07f9feb969f3d (diff)
downloademacs-175a3a5144ab17bc8c854cd0cc6c1771d79a9f9c.tar.gz
emacs-175a3a5144ab17bc8c854cd0cc6c1771d79a9f9c.zip
* 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. Fixes: debbugs:17236
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/simple.el7
2 files changed, 12 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e90693180a8..f5f3208256e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12014-04-12 Barry O'Reilly <gundaetiapo@gmail.com>
2
3 * simple.el (undo): Prevent insertion of identity mapping into
4 undo-equiv-table so as undo-only does not inf loop in the presence
5 of consecutive nils in undo list.
6
12014-04-12 Matthias Dahl <matthias.dahl@binary-island.eu> 72014-04-12 Matthias Dahl <matthias.dahl@binary-island.eu>
2 8
3 * faces.el (make-face): Deprecate optional argument as it is no 9 * faces.el (make-face): Deprecate optional argument as it is no
diff --git a/lisp/simple.el b/lisp/simple.el
index 68bfd7b14f4..a5e8381eaaa 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2143,7 +2143,12 @@ as an argument limits undo to changes within the current region."
2143 ;; above when checking. 2143 ;; above when checking.
2144 (while (eq (car list) nil) 2144 (while (eq (car list) nil)
2145 (setq list (cdr list))) 2145 (setq list (cdr list)))
2146 (puthash list (if undo-in-region t pending-undo-list) 2146 (puthash list
2147 ;; Prevent identity mapping. This can happen if
2148 ;; consecutive nils are erroneously in undo list.
2149 (if (or undo-in-region (eq list pending-undo-list))
2150 t
2151 pending-undo-list)
2147 undo-equiv-table)) 2152 undo-equiv-table))
2148 ;; Don't specify a position in the undo record for the undo command. 2153 ;; Don't specify a position in the undo record for the undo command.
2149 ;; Instead, undoing this should move point to where the change is. 2154 ;; Instead, undoing this should move point to where the change is.