3891 @return language of the editor |
3891 @return language of the editor |
3892 @rtype str |
3892 @rtype str |
3893 """ |
3893 """ |
3894 if self.apiLanguage == "Guessed" or self.apiLanguage.startswith("Pygments|"): |
3894 if self.apiLanguage == "Guessed" or self.apiLanguage.startswith("Pygments|"): |
3895 lang = self.lexer_.name() |
3895 lang = self.lexer_.name() |
3896 if normalized: # __IGNORE_WARNING_Y102__ |
3896 if normalized and lang in ("Python 2.x", "Python"): |
3897 # adjust some Pygments lexer names |
3897 # adjust some Pygments lexer names |
3898 if lang in ("Python 2.x", "Python"): |
3898 lang = "Python3" |
3899 lang = "Python3" |
|
3900 |
3899 |
3901 else: |
3900 else: |
3902 lang = self.apiLanguage |
3901 lang = self.apiLanguage |
3903 if forPygments: # __IGNORE_WARNING_Y102__ |
3902 if forPygments and lang == "Python3": |
3904 # adjust some names to Pygments lexer names |
3903 # adjust some names to Pygments lexer names |
3905 if lang == "Python3": |
3904 lang = "Python" |
3906 lang = "Python" |
|
3907 return lang |
3905 return lang |
3908 |
3906 |
3909 def __checkLanguage(self): |
3907 def __checkLanguage(self): |
3910 """ |
3908 """ |
3911 Private method to check the selected language of the language submenu. |
3909 Private method to check the selected language of the language submenu. |