From 02dcab4b14be215cbec4e92f915fb0205dd562f3 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Thu, 18 Aug 2011 23:01:45 +0000 Subject: [PATCH] Add Cython filetype Patch by Matthew Brush, thanks. Also remove the Cython keywords from Python filetype. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5889 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 7 +++++++ data/filetype_extensions.conf | 3 ++- data/filetypes.Cython.conf | 16 ++++++++++++++++ data/filetypes.python | 2 +- 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 data/filetypes.Cython.conf diff --git a/ChangeLog b/ChangeLog index 7feda55e..94c82ff3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-08-19 Colomban Wendling + + * data/filetype_extensions.conf, data/filetypes.Cython.conf, + data/filetypes.python: + Add Cython filetype (patch by Matthew Brush, thanks). + + 2011-08-15 Frank Lanitz * doc/plugins.dox: diff --git a/data/filetype_extensions.conf b/data/filetype_extensions.conf index 75ef339a..136d9042 100644 --- a/data/filetype_extensions.conf +++ b/data/filetype_extensions.conf @@ -14,6 +14,7 @@ CMake=CMakeLists.txt;*.cmake;*.ctest; COBOL=*.cob;*.cpy;*.cbl;*.cobol; Conf=*.conf;*.ini;config;*rc;*.cfg;*.desktop; CSS=*.css; +Cython=*.pyx;*.pxd;*.pxi; D=*.d;*.di; Diff=*.diff;*.patch;*.rej; Docbook=*.docbook; @@ -59,7 +60,7 @@ None=*; # Note: restarting is required after editing groups [Groups] -Programming=Genie;Scala; +Programming=Cython;Genie;Scala; Script= Markup= Misc= diff --git a/data/filetypes.Cython.conf b/data/filetypes.Cython.conf new file mode 100644 index 00000000..5248756d --- /dev/null +++ b/data/filetypes.Cython.conf @@ -0,0 +1,16 @@ +[styling=Python] + +[keywords] +primary=and as assert break class continue def del elif else except exec finally for from global if import in is lambda not or pass print raise return try while with yield False None True api by cdef cimport cpdef ctypedef enum extern gil include inline nogil property public readonly struct union DEF IF ELIF ELSE NULL bint char Py_ssize_t short size_t void +identifiers=ArithmeticError AssertionError AttributeError BaseException BufferError BytesWarning DeprecationWarning EOFError Ellipsis EnvironmentError Exception False FloatingPointError FutureWarning GeneratorExit IOError ImportError ImportWarning IndentationError IndexError KeyError KeyboardInterrupt LookupError MemoryError NameError None NotImplemented NotImplementedError OSError OverflowError PendingDeprecationWarning ReferenceError RuntimeError RuntimeWarning StandardError StopIteration SyntaxError SyntaxWarning SystemError SystemExit TabError True TypeError UnboundLocalError UnicodeDecodeError UnicodeEncodeError UnicodeError UnicodeTranslateError UnicodeWarning UserWarning ValueError Warning ZeroDivisionError __debug__ __doc__ __import__ __name__ __package__ abs all any apply basestring bin bool buffer bytearray bytes callable chr classmethod cmp coerce compile complex copyright credits delattr dict dir divmod enumerate eval execfile exit file filter float format frozenset getattr globals hasattr hash help hex id input int intern isinstance issubclass iter len license list locals long map max min next object oct open ord pow print property quit range raw_input reduce reload repr reversed round set setattr slice sorted staticmethod str sum super tuple type unichr unicode vars xrange zip + +[settings] +lexer_filetype=Python +tag_parser=Python +extension=pyx +comment_single=# + +[build-menu] +FT_00_LB=_Compile +FT_00_CM=cython "%f" +FT_00_WD= diff --git a/data/filetypes.python b/data/filetypes.python index 52c50870..5dc62765 100644 --- a/data/filetypes.python +++ b/data/filetypes.python @@ -21,7 +21,7 @@ decorator=preprocessor [keywords] # all items must be in one line -primary=and as assert break cdef cimport class continue cpdef def del elif else except exec finally for from global if import in is lambda not or pass print raise return try while with yield False None True +primary=and as assert break class continue def del elif else except exec finally for from global if import in is lambda not or pass print raise return try while with yield False None True # additional keywords, will be highlighted with style "word2" # these are the builtins for Python 2.5 created with ' '.join(dir(__builtins__)) identifiers=ArithmeticError AssertionError AttributeError BaseException BufferError BytesWarning DeprecationWarning EOFError Ellipsis EnvironmentError Exception False FloatingPointError FutureWarning GeneratorExit IOError ImportError ImportWarning IndentationError IndexError KeyError KeyboardInterrupt LookupError MemoryError NameError None NotImplemented NotImplementedError OSError OverflowError PendingDeprecationWarning ReferenceError RuntimeError RuntimeWarning StandardError StopIteration SyntaxError SyntaxWarning SystemError SystemExit TabError True TypeError UnboundLocalError UnicodeDecodeError UnicodeEncodeError UnicodeError UnicodeTranslateError UnicodeWarning UserWarning ValueError Warning ZeroDivisionError __debug__ __doc__ __import__ __name__ __package__ abs all any apply basestring bin bool buffer bytearray bytes callable chr classmethod cmp coerce compile complex copyright credits delattr dict dir divmod enumerate eval execfile exit file filter float format frozenset getattr globals hasattr hash help hex id input int intern isinstance issubclass iter len license list locals long map max min next object oct open ord pow print property quit range raw_input reduce reload repr reversed round set setattr slice sorted staticmethod str sum super tuple type unichr unicode vars xrange zip