aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Möllmann2024-12-20 07:03:59 +0100
committerGerd Möllmann2024-12-20 07:03:59 +0100
commit82c3fcd17e3eb3756bd3533c39d89c21ec7fdce5 (patch)
tree30b47b72619a8373acf69caa8ecc50e56d139633 /src
parent42ab0f162cb37eeddae53675fba310b8a22ff934 (diff)
downloademacs-82c3fcd17e3eb3756bd3533c39d89c21ec7fdce5.tar.gz
emacs-82c3fcd17e3eb3756bd3533c39d89c21ec7fdce5.zip
Allow xt-mouse-tests to run
This is basically a workaround for running a test in batch mode which should have a tty frame available but doesn't. * src/frame.c (check_tty): Relax check if noninteractive. * lisp/xt-mouse.el (xterm-mouse-event): Don't use frame-at if noninteractive.
Diffstat (limited to 'src')
-rw-r--r--src/frame.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c
index 18e1078efe4..431b04fc34e 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -152,6 +152,13 @@ check_window_system (struct frame *f)
152void 152void
153check_tty (struct frame *f) 153check_tty (struct frame *f)
154{ 154{
155 /* FIXME: the noninteractive case is here because some tests running
156 in batch mode, like xt-mouse-tests, test with the initial frame
157 which is no tty frame. It would be nicer if the test harness
158 would allow testing with real tty frames. */
159 if (f && noninteractive)
160 return;
161
155 if (!f || !FRAME_TERMCAP_P (f)) 162 if (!f || !FRAME_TERMCAP_P (f))
156 error ("tty frame should be used"); 163 error ("tty frame should be used");
157} 164}