]> git.eshelyaron.com Git - emacs.git/commitdiff
Addendum to: Undo in region after markers in undo history relocated
authorBarry O'Reilly <gundaetiapo@gmail.com>
Tue, 25 Mar 2014 23:30:08 +0000 (19:30 -0400)
committerBarry O'Reilly <gundaetiapo@gmail.com>
Tue, 25 Mar 2014 23:30:08 +0000 (19:30 -0400)
* simple.el (primitive-undo): Correction to 2014-03-24 change.

Fixes: debbugs:16818
lisp/ChangeLog
lisp/simple.el

index e3a9a669e482658f63b08e44607118ed86eec81a..882bd4e19cb9a4260c3c40b024ad2b8a96fed11f 100644 (file)
@@ -1,3 +1,7 @@
+2014-03-25  Barry O'Reilly  <gundaetiapo@gmail.com>
+
+       * simple.el (primitive-undo): Correction to 2014-03-24 change.
+
 2014-03-25  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp.el (tramp-methods, tramp-connection-timeout): Fix docstring.
index 7be1f1f63997319e6994a2f3a0117f8e8b09fec9..98604a44de55e5e01d2daa69313b0810fc899720 100644 (file)
@@ -2321,9 +2321,10 @@ Return what remains of the list."
            ;; Even though these elements are not expected in the undo
            ;; list, adjust them to be conservative for the 24.4
            ;; release.  (Bug#16818)
-           (set-marker marker
-                       (- marker offset)
-                       (marker-buffer marker)))
+           (when (marker-buffer marker)
+             (set-marker marker
+                         (- marker offset)
+                         (marker-buffer marker))))
           (_ (error "Unrecognized entry in undo list %S" next))))
       (setq arg (1- arg)))
     ;; Make sure an apply entry produces at least one undo entry,