aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Monnier2019-11-16 14:39:00 +1300
committerPhil Sainty2019-11-18 21:25:36 +1300
commit6b361d95302c23dc65468ff9f5828577625e0fe2 (patch)
treeba821a64ff096793cba5a05971bc7f374028afc8 /test
parent206f36b38cfe50e92acc8d48926d1e5e2dec5939 (diff)
downloademacs-6b361d95302c23dc65468ff9f5828577625e0fe2.tar.gz
emacs-6b361d95302c23dc65468ff9f5828577625e0fe2.zip
lisp/so-long.el: Use (interactive "@") for menu commands
* lisp/so-long.el (so-long-menu, so-long-menu-item-replace-action) (so-long-revert): Use interactive code "@", replacing all uses of `so-long-menu-click-window'. This approach leaves the window selected afterwards, whereas the old code did not; but that is not a problem. (so-long-menu-click-window, so-long-menu-item-revert): Remove the deprecated functions. * test/lisp/so-long-tests/so-long-tests.el (so-long-tests-so-long-menu-item-replace-action): Update the test. Co-authored-by: Phil Sainty <psainty@orcon.net.nz>
Diffstat (limited to 'test')
-rw-r--r--test/lisp/so-long-tests/so-long-tests.el6
1 files changed, 1 insertions, 5 deletions
diff --git a/test/lisp/so-long-tests/so-long-tests.el b/test/lisp/so-long-tests/so-long-tests.el
index 99af5e91ba0..5c885c4fd09 100644
--- a/test/lisp/so-long-tests/so-long-tests.el
+++ b/test/lisp/so-long-tests/so-long-tests.el
@@ -261,10 +261,6 @@
261(ert-deftest so-long-tests-so-long-menu-item-replace-action () 261(ert-deftest so-long-tests-so-long-menu-item-replace-action ()
262 "Test using the `so-long-menu-item-replace-action' menu item." 262 "Test using the `so-long-menu-item-replace-action' menu item."
263 (with-temp-buffer 263 (with-temp-buffer
264 ;; Due to (with-selected-window (so-long-menu-click-window) ...)
265 ;; (used by `so-long-menu-item-replace-action'), our temp buffer
266 ;; must be in the selected window.
267 (set-window-buffer nil (current-buffer))
268 (insert "#!emacs\n") 264 (insert "#!emacs\n")
269 (normal-mode) 265 (normal-mode)
270 (so-long-tests-remember) 266 (so-long-tests-remember)
@@ -278,7 +274,7 @@
278 ;; After all actions have been used, revert to normal and assert 274 ;; After all actions have been used, revert to normal and assert
279 ;; that the most recent action to have been applied is the one 275 ;; that the most recent action to have been applied is the one
280 ;; we have just reverted. 276 ;; we have just reverted.
281 (so-long-menu-item-revert) 277 (so-long-revert)
282 (so-long-tests-assert-reverted action)))) 278 (so-long-tests-assert-reverted action))))
283 279
284(ert-deftest so-long-tests-major-mode () 280(ert-deftest so-long-tests-major-mode ()