patch 8.2.4503: Vim9: there is no point in supporting :Print and :mode

Problem:    Vim9: there is no point in supporting :Print and :mode.
Solution:   Do not recognize :Print and :mode as commands. (closes #9870)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 36a7386..287045b 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -3752,6 +3752,10 @@
 		break;
 	    }
 
+	// :Print and :mode are not supported in Vim9 script
+	if (vim9 && (eap->cmdidx == CMD_mode || eap->cmdidx == CMD_Print))
+	    eap->cmdidx = CMD_SIZE;
+
 	// Do not recognize ":*" as the star command unless '*' is in
 	// 'cpoptions'.
 	if (eap->cmdidx == CMD_star && vim_strchr(p_cpo, CPO_STAR) == NULL)