]> git.eshelyaron.com Git - emacs.git/commitdiff
Suppress interactive-only warnings in undo-tests.el (Bug#36565)
authorStefan Kangas <stefankangas@gmail.com>
Fri, 2 Aug 2019 14:46:08 +0000 (16:46 +0200)
committerNoam Postavsky <npostavs@gmail.com>
Thu, 8 Aug 2019 12:26:31 +0000 (08:26 -0400)
* test/src/undo-tests.el (undo-test-region-deletion)
(undo-test-region-example, undo-test-marker-adjustment-nominal)
(undo-test-region-t-marker, undo-test-marker-adjustment-moved)
(undo-test-region-mark-adjustment): Suppress interactive-only warnings
by using funcall-interactively.

test/src/undo-tests.el

index 8395ba9909901e3ec7d1404f591155b11090841f..fc2dfe027e87aa28a41a88c8e6fa3819824bdc2a 100644 (file)
     (insert "12345")
     (search-backward "4")
     (undo-boundary)
-    (delete-forward-char 1)
+    (funcall-interactively 'delete-forward-char 1)
     (search-backward "1")
     (undo-boundary)
     (insert "xxxx")
@@ -299,7 +299,7 @@ undo-make-selective-list."
     (insert "ddd")
     (search-backward "ad")
     (undo-boundary)
-    (delete-forward-char 2)
+    (funcall-interactively 'delete-forward-char 2)
     (undo-boundary)
     ;; Select "dd"
     (push-mark (point) t t)
@@ -348,7 +348,7 @@ undo-make-selective-list."
     (let ((m (make-marker)))
       (set-marker m 2 (current-buffer))
       (goto-char (point-min))
-      (delete-forward-char 3)
+      (funcall-interactively 'delete-forward-char 3)
       (undo-boundary)
       (should (= (point-min) (marker-position m)))
       (undo)
@@ -369,7 +369,7 @@ undo-make-selective-list."
       (push-mark (point) t t)
       (setq mark-active t)
       (goto-char (point-min))
-      (delete-forward-char 1) ;; delete region covering "ab"
+      (funcall-interactively 'delete-forward-char 1) ; delete region covering "ab"
       (undo-boundary)
       (should (= (point-min) (marker-position m)))
       ;; Resurrect "ab". m's insertion type means the reinsertion
@@ -389,7 +389,7 @@ Demonstrates bug 16818."
     (let ((m (make-marker)))
       (set-marker m 2 (current-buffer)) ; m at b
       (goto-char (point-min))
-      (delete-forward-char 3) ; m at d
+      (funcall-interactively 'delete-forward-char 3) ; m at d
       (undo-boundary)
       (set-marker m 4) ; m at g
       (undo)
@@ -422,7 +422,7 @@ Demonstrates bug 16818."
     (push-mark (point) t t)
     (setq mark-active t)
     (goto-char (- (point) 3))
-    (delete-forward-char 1)
+    (funcall-interactively 'delete-forward-char 1)
     (undo-boundary)
 
     (insert "bbb")