diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-06-19 00:47:00 +0200 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-06-19 00:47:00 +0200 |
commit | 68cb71c0928eb8b10487a125192f43923e8bfe7f (patch) | |
tree | 053133358af1bd991d60ed6c29590ad84b29fed0 /test/lisp/simple-tests.el | |
parent | 87c9d8fcec183c8f4933e218c1895b6a0722b1e1 (diff) | |
parent | 9ae514a9b7ed368ea97ddefa806079b6423833cb (diff) | |
download | emacs-68cb71c0928eb8b10487a125192f43923e8bfe7f.tar.gz |
Merge from origin/emacs-25
9ae514a * etc/AUTHORS: Update the AUTHORS file
3ca428e add entries to authors.el
66d556b Fix eldoc-related freezes in python mode
d59bcbc Handle mouse leaving initial window in `mouse-set-region' (Bu...
27fe1e4 org.el: Fix bindings of < and > for calendar scrolling
a813487 Fix undo boundary in recursive edit (Bug#23632)
1f85b7c Doc fixes re alist-get. (Bug#23548)
ba3f206 * lisp/progmodes/python.el (inferior-python-mode): Avoid tabs...
56fa055 * src/syntax.c (syms_of_syntax) <comment-end-can-be-escaped>:...
4c1370a * lisp/help-fns.el (describe-function-1): Fix handling of fil...
a3f7ae8 * lisp/emacs-lisp/cl-macs.el (cl-loop): Doc fix re "by".
601b9b2 * doc/misc/cl.texi (Mapping over Sequences): Fix cl-notevery.
Diffstat (limited to 'test/lisp/simple-tests.el')
-rw-r--r-- | test/lisp/simple-tests.el | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index 12ebc75ea92..40cd1d29498 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -310,6 +310,38 @@ (= 6 (undo-test-point-after-forward-kill)))) +(defmacro simple-test-undo-with-switched-buffer (buffer &rest body) + (let ((before-buffer (make-symbol "before-buffer"))) + `(let ((,before-buffer (current-buffer))) + (unwind-protect + (progn + (switch-to-buffer ,buffer) + ,@body) + (switch-to-buffer ,before-buffer))))) + +;; This tests for a regression in emacs 25.0 see bug #23632 +(ert-deftest simple-test-undo-extra-boundary-in-tex () + (should + (string= + "" + (simple-test-undo-with-switched-buffer + "temp.tex" + (latex-mode) + ;; This macro calls `latex-insert-block' + (execute-kbd-macro + (read-kbd-macro + " +C-c C-o ;; latex-insert-block +RET ;; newline +C-/ ;; undo +" + )) + (buffer-substring-no-properties + (point-min) + (point-max)))))) + + + (provide 'simple-test) ;;; simple-test.el ends here |