diff -r 9b6d993bf7c2 -r 11fdeb2891a8 QScintilla/Editor.py --- a/QScintilla/Editor.py Thu Sep 05 18:11:19 2013 +0200 +++ b/QScintilla/Editor.py Tue Sep 10 18:50:19 2013 +0200 @@ -1420,10 +1420,10 @@ if not language: ext = os.path.splitext(filename)[1] if ext in [".py", ".pyw"]: - if self.isPy2File(): + if self.isPy3File(): + language = "Python3" + elif self.isPy2File(): language = "Python2" - elif self.isPy3File(): - language = "Python3" else: # default is Python 3 language = "Python3" @@ -1541,10 +1541,10 @@ filename = os.path.basename(filename) apiLanguage = Preferences.getEditorLexerAssoc(filename) if apiLanguage == "": - if self.isPy2File(): + if self.isPy3File(): + apiLanguage = "Python3" + elif self.isPy2File(): apiLanguage = "Python2" - elif self.isPy3File(): - apiLanguage = "Python3" elif self.isRubyFile(): apiLanguage = "Ruby" @@ -1668,10 +1668,10 @@ if not ftype: ftype = self.getFileTypeByFlag() if not ftype: - if self.isPy2File(): + if self.isPy3File(): + ftype = "Python3" + elif self.isPy2File(): ftype = "Python2" - elif self.isPy3File(): - ftype = "Python3" elif self.isRubyFile(): ftype = "Ruby" else: