diff options
| -rw-r--r-- | lisp/simple.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 4db81071b58..65906c88693 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -2565,10 +2565,10 @@ Return what remains of the list." | |||
| 2565 | (setq did-apply t))) | 2565 | (setq did-apply t))) |
| 2566 | ;; Element (STRING . POS) means STRING was deleted. | 2566 | ;; Element (STRING . POS) means STRING was deleted. |
| 2567 | (`(,(and string (pred stringp)) . ,(and pos (pred integerp))) | 2567 | (`(,(and string (pred stringp)) . ,(and pos (pred integerp))) |
| 2568 | (when (let ((apos (abs pos))) | 2568 | (let ((valid-marker-adjustments nil) |
| 2569 | (or (< apos (point-min)) (> apos (point-max)))) | 2569 | (apos (abs pos))) |
| 2570 | (error "Changes to be undone are outside visible portion of buffer")) | 2570 | (when (or (< apos (point-min)) (> apos (point-max))) |
| 2571 | (let (valid-marker-adjustments) | 2571 | (error "Changes to be undone are outside visible portion of buffer")) |
| 2572 | ;; Check that marker adjustments which were recorded | 2572 | ;; Check that marker adjustments which were recorded |
| 2573 | ;; with the (STRING . POS) record are still valid, ie | 2573 | ;; with the (STRING . POS) record are still valid, ie |
| 2574 | ;; the markers haven't moved. We check their validity | 2574 | ;; the markers haven't moved. We check their validity |
| @@ -2579,7 +2579,7 @@ Return what remains of the list." | |||
| 2579 | (let* ((marker-adj (pop list)) | 2579 | (let* ((marker-adj (pop list)) |
| 2580 | (m (car marker-adj))) | 2580 | (m (car marker-adj))) |
| 2581 | (and (eq (marker-buffer m) (current-buffer)) | 2581 | (and (eq (marker-buffer m) (current-buffer)) |
| 2582 | (= pos m) | 2582 | (= apos m) |
| 2583 | (push marker-adj valid-marker-adjustments)))) | 2583 | (push marker-adj valid-marker-adjustments)))) |
| 2584 | ;; Insert string and adjust point | 2584 | ;; Insert string and adjust point |
| 2585 | (if (< pos 0) | 2585 | (if (< pos 0) |