diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-08-05 14:07:00 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-08-05 14:07:00 -0700 |
commit | 1a86b5d6074d26d1a3a978cb52b2147b6f359694 (patch) | |
tree | 5b609435fb29b6f62766ddd51d8649013913970e /test | |
parent | c5823cdae3de078e6db58df25769011ef3e52f36 (diff) | |
parent | d4c6774f40b6ae1fad091f66e8e43913bc9a2724 (diff) |
Merge from origin/emacs-25
d4c6774 Fix missing point information in undo
3a9d629 Avoid crashes when buffer modification hooks clobber match data
178b2f5 Note combine-and-quote-strings doesn't shell quote
dec7567 Explain when package-initialize isn't called
113d1e2 Fix escaping in sh-indent-after-continuation docstr
80e2044 ; * etc/NEWS: Improve previous change.
5bb9e6c ; * etc/NEWS: Document how to avoid horizontal scroll bars.
38f4b8e Clarify the documentation of back-references in replacements
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/simple-tests.el | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index 97b6c49162..d022240ae5 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -325,6 +325,7 @@ (undo-test-point-after-forward-kill)))) (defmacro simple-test-undo-with-switched-buffer (buffer &rest body) + (declare (indent 1) (debug t)) (let ((before-buffer (make-symbol "before-buffer"))) `(let ((,before-buffer (current-buffer))) (unwind-protect @@ -354,8 +355,24 @@ C-/ ;; undo (point-min) (point-max)))))) +(ert-deftest missing-record-point-in-undo () + "Check point is being restored correctly. - +See Bug#21722." + (should + (= 5 + (with-temp-buffer + (generate-new-buffer " *temp*") + (emacs-lisp-mode) + (setq buffer-undo-list nil) + (insert "(progn (end-of-line) (insert \"hello\"))") + (beginning-of-line) + (forward-char 4) + (undo-boundary) + (eval-defun nil) + (undo-boundary) + (undo) + (point))))) (provide 'simple-test) ;;; simple-test.el ends here |