qemacs-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemacs-commit] qemacs extra-modes.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs extra-modes.c
Date: Sun, 18 May 2014 11:01:00 +0000

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        14/05/18 11:01:00

Modified files:
        .              : extra-modes.c 

Log message:
        msg1

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/extra-modes.c?cvsroot=qemacs&r1=1.18&r2=1.19

Patches:
Index: extra-modes.c
===================================================================
RCS file: /sources/qemacs/qemacs/extra-modes.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- extra-modes.c       13 May 2014 08:49:17 -0000      1.18
+++ extra-modes.c       18 May 2014 11:01:00 -0000      1.19
@@ -242,30 +242,36 @@
 /*---------------- Basic/Visual Basic coloring ----------------*/
 
 static char const basic_keywords[] = {
-    "|access|alias|and|any|as|base|begin|boolean|byval"
-    "|call|case|circle|close|const|currency"
-    "|declare|defcur|defdbl|defint|deflng|defsng"
-    "|defstr|defvar|delete|dim|do|double"
-    "|else|elseif|end|eqv|erase|error|exit|explicit"
-    "|false|for|function|get|global|gosub|goto"
-    "|if|imp|input|integer|is"
-    "|len|let|lib|like|line|local|lock|long|loop|lset"
-    "|me|mod|name|new|next|not|null"
-    "|on|open|option|or|print|pset|put"
-    "|redim|rem|resume|return|rset"
-    "|scale|select|set|shared|single|spc|static"
-    "|step|stop|string|sub"
-    "|tab|then|to|true|type|typeof"
-    "|unlock|until|variant|wend|while|width|xor"
-    "|"
+    "addhandler|addressof|alias|and|andalso|ansi|as|assembly|"
+    "auto|byref|byval|call|case|catch|class|const|"
+    "declare|default|delegate|dim|directcast|do|"
+    "each|else|elseif|end|enum|erase|error|"
+    "event|exit|false|finally|for|friend|function|get|"
+    "gettype|gosub|goto|handles|if|implements|imports|in|"
+    "inherits|interface|is|let|lib|like|"
+    "loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|"
+    "namespace|new|next|not|nothing|notinheritable|notoverridable|"
+    "on|option|optional|or|orelse|overloads|overridable|overrides|"
+    
"paramarray|preserve|private|property|protected|public|raiseevent|readonly|"
+    "redim|rem|removehandler|resume|return|select|set|shadows|"
+    "shared|static|step|stop|structure|"
+    "sub|synclock|then|throw|to|true|try|typeof|"
+    "unicode|until|when|while|with|withevents|writeonly|xor|"
+};
+
+static char const basic_types[] = {
+    "boolean|byte|char|cbool|"
+    "cbyte|cchar|cdate|cdec|cdbl|cint|clng|cobj|cshort|csng|cstr|ctype|"
+    "date|decimal|double|integer|long|object|short|single|string|variant|"
 };
 
 enum {
     BASIC_STYLE_TEXT =        QE_STYLE_DEFAULT,
-    BASIC_STYLE_KEYWORD =     QE_STYLE_KEYWORD,
-    BASIC_STYLE_PREPROCESS =  QE_STYLE_PREPROCESS,
     BASIC_STYLE_COMMENT =     QE_STYLE_COMMENT,
     BASIC_STYLE_STRING =      QE_STYLE_STRING,
+    BASIC_STYLE_KEYWORD =     QE_STYLE_KEYWORD,
+    BASIC_STYLE_TYPE =        QE_STYLE_TYPE,
+    BASIC_STYLE_PREPROCESS =  QE_STYLE_PREPROCESS,
     BASIC_STYLE_IDENTIFIER =  QE_STYLE_VARIABLE,
 };
 
@@ -318,6 +324,10 @@
                 SET_COLOR(str, start, i, BASIC_STYLE_KEYWORD);
                 continue;
             }
+            if (is_lc_keyword(str, start, i, basic_types)) {
+                SET_COLOR(str, start, i, BASIC_STYLE_TYPE);
+                continue;
+            }
             SET_COLOR(str, start, i, BASIC_STYLE_IDENTIFIER);
             continue;
         }
@@ -2165,7 +2175,7 @@
     /* python mode is almost like the text mode, so we copy and patch it */
     memcpy(&python_mode, &text_mode, sizeof(ModeDef));
     python_mode.name = "Python";
-    python_mode.extensions = "py";
+    python_mode.extensions = "py|pyt";
     python_mode.mode_probe = python_mode_probe;
     python_mode.colorize_func = python_colorize_line;
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]