patch 8.2.4951: smart indenting done when not enabled

Problem:    Smart indenting done when not enabled.
Solution:   Check option values before setting can_si. (closes #10420)
diff --git a/src/edit.c b/src/edit.c
index 3da3db6..5b06131 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -1295,7 +1295,7 @@
 #endif
 	    compl_busy = FALSE;
 #ifdef FEAT_SMARTINDENT
-	    can_si = TRUE; // allow smartindenting
+	    can_si = may_do_si(); // allow smartindenting
 #endif
 	    break;