patch 8.2.2182: Vim9: value of 'magic' is still relevant

Problem:    Vim9: value of 'magic' is still relevant.
Solution:   Always behave like 'magic' is on in Vim9 script (closes #7509)
diff --git a/src/option.c b/src/option.c
index 935a325..dd09e0e 100644
--- a/src/option.c
+++ b/src/option.c
@@ -6996,3 +6996,22 @@
     return OK;
 }
 #endif
+
+/*
+ * Get the value of 'magic' adjusted for Vim9 script.
+ */
+    int
+magic_isset(void)
+{
+    switch (magic_overruled)
+    {
+	case MAGIC_ON:      return TRUE;
+	case MAGIC_OFF:     return FALSE;
+	case MAGIC_NOT_SET: break;
+    }
+#ifdef FEAT_EVAL
+    if (in_vim9script())
+	return TRUE;
+#endif
+    return p_magic;
+}