aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorBarry O'Reilly <[email protected]>2014-03-25 19:30:08 -0400
committerBarry O'Reilly <[email protected]>2014-03-25 19:30:08 -0400
commit657e54f709cb435a5ca93f0184e214dd9e586f29 (patch)
tree4eabee44f09e564bd8e825999e088d8116492abc /lisp/simple.el
parent75b7e407e8d4303930dbfad2df2f36b994f368ed (diff)
Addendum to: Undo in region after markers in undo history relocated
* simple.el (primitive-undo): Correction to 2014-03-24 change. Fixes: debbugs:16818
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 7be1f1f639..98604a44de 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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,