Revert previous code elimination, 'filename' is needed.
diff --git a/Lib/idlelib/ScriptBinding.py b/Lib/idlelib/ScriptBinding.py
index 16fd14d..084c607 100644
--- a/Lib/idlelib/ScriptBinding.py
+++ b/Lib/idlelib/ScriptBinding.py
@@ -53,7 +53,7 @@
         self.flist = self.editwin.flist
         self.root = self.flist.root
 
-    def check_module_event(self, event=None):
+    def check_module_event(self, event):
         filename = self.getfilename()
         if not filename:
             return
@@ -133,7 +133,12 @@
         add that directory to its sys.path if not already included.
 
         """
-        code = self.check_module_event(event)
+        filename = self.getfilename()
+        if not filename:
+            return
+        if not self.tabnanny(filename):
+            return
+        code = self.checksyntax(filename)
         if not code:
             return
         shell = self.shell