diff -r cfbb47b6d885 -r fef91a1eb27b QScintilla/Lexers/__init__.py --- a/QScintilla/Lexers/__init__.py Sat Jun 21 18:11:38 2014 +0200 +++ b/QScintilla/Lexers/__init__.py Sat Jun 21 22:35:36 2014 +0200 @@ -157,6 +157,11 @@ [QApplication.translate('Lexers', "Gettext"), 'dummy.po', "lexerGettext.png"] + if QSCINTILLA_VERSION() >= 0x020803: + supportedLanguages["CoffeeScript"] = \ + [QApplication.translate('Lexers', "CoffeeScript"), 'dummy.coffee', + "lexerCoffeeScript.png"] + for name in LexerRegistry: if not name.startswith("Pygments|"): supportedLanguages[name] = \ @@ -299,6 +304,9 @@ elif language == "Gettext": from .LexerPO import LexerPO return LexerPO(parent) + elif language == "CoffeeScript": + from .LexerCoffeeScript import LexerCoffeeScript + return LexerCoffeeScript(parent) elif language in LexerRegistry: return LexerRegistry[language][2](parent) @@ -472,6 +480,13 @@ 'Gettext Files (*.po)'), ) + if QSCINTILLA_VERSION() >= 0x020803: + openFileFiltersList.append( + QApplication.translate( + 'Lexers', + 'CoffeeScript Files (*.coffee)'), + ) + for name in LexerRegistry: openFileFiltersList.extend(LexerRegistry[name][3]) @@ -670,6 +685,13 @@ 'Gettext Files (*.po)'), ) + if QSCINTILLA_VERSION() >= 0x020803: + saveFileFiltersList.append( + QApplication.translate( + 'Lexers', + 'CoffeeScript Files (*.coffee)'), + ) + for name in LexerRegistry: saveFileFiltersList.extend(LexerRegistry[name][4]) @@ -824,8 +846,8 @@ '*.m.octave': "Octave", }) - if QSCINTILLA_VERSION() >= 0x020802: - assocs['*.po'] = "Gettext" + if QSCINTILLA_VERSION() >= 0x020803: + assocs['*.coffee'] = "CoffeeScript" for name in LexerRegistry: for pattern in LexerRegistry[name][5]: