emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp ChangeLog simple.el


From: Stefan Monnier
Subject: [Emacs-diffs] emacs/lisp ChangeLog simple.el
Date: Sat, 14 Mar 2009 01:51:37 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        09/03/14 01:51:36

Modified files:
        lisp           : ChangeLog simple.el 

Log message:
        (undo): Don't loop when encountering empty undo records.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15467&r2=1.15468
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/simple.el?cvsroot=emacs&r1=1.974&r2=1.975

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15467
retrieving revision 1.15468
diff -u -b -r1.15467 -r1.15468
--- ChangeLog   14 Mar 2009 00:26:34 -0000      1.15467
+++ ChangeLog   14 Mar 2009 01:51:34 -0000      1.15468
@@ -1,3 +1,7 @@
+2009-03-14  Stefan Monnier  <address@hidden>
+
+       * simple.el (undo): Don't loop when encountering empty undo records.
+
 2009-03-13  Tassilo Horn  <address@hidden>
 
        * doc-view.el (doc-view-mode-map): Bind RET to image-next-line.

Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.974
retrieving revision 1.975
diff -u -b -r1.974 -r1.975
--- simple.el   10 Mar 2009 05:01:45 -0000      1.974
+++ simple.el   14 Mar 2009 01:51:36 -0000      1.975
@@ -1682,9 +1682,13 @@
     ;; In the ordinary case (not within a region), map the redo
     ;; record to the following undos.
     ;; I don't know how to do that in the undo-in-region case.
-    (puthash buffer-undo-list
-            (if undo-in-region t pending-undo-list)
-            undo-equiv-table)
+    (let ((list buffer-undo-list))
+      ;; Strip any leading undo boundaries there might be, like we do
+      ;; above when checking.
+      (while (eq (car list) nil)
+       (setq list (cdr list)))
+      (puthash list (if undo-in-region 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.
     (let ((tail buffer-undo-list)




reply via email to

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