qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs clang.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs clang.c
Date: Sat, 01 Mar 2014 19:21:41 +0000

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        14/03/01 19:21:41

Modified files:
        .              : clang.c 

Log message:
        improve C mode
        
        * autodetect GNU calc files
        * autodetect Objective C modules

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/clang.c?cvsroot=qemacs&r1=1.47&r2=1.48

Patches:
Index: clang.c
===================================================================
RCS file: /sources/qemacs/qemacs/clang.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- clang.c     6 Feb 2014 00:22:17 -0000       1.47
+++ clang.c     1 Mar 2014 19:21:40 -0000       1.48
@@ -45,11 +45,17 @@
     "_Bool|_Complex|_Imaginary|";
 
 static const char c_mode_extensions[] =
-    "c|h|y|l|lex|e|qe|cs|idl|jav|java|js|json|"
+    "c|h|C|H|"          /* C language */
+    "y|l|lex|"          /* yacc, lex */
+    "cc|hh|cpp|hpp|cxx|hxx|CPP|CC|c++|"   /* C++ */
+    "m|"                /* Objective-C */
+    "e|qe|cs|idl|"
+    "jav|java|js|json|" /* Java, Javascript, JSon */
     "ec|ecp|"           /* Informix embedded C */
     "pgc|"              /* Postgres embedded C */
     "pcc|"              /* Oracle C++ */
-    "cc|hh|cpp|hpp|cxx|hxx|C|H|CPP|CC|c++";   /* C++ extensions */
+    "cal"               /* GNU Calc */
+    ;
 
 #if 0
 static int get_c_identifier(char *buf, int buf_size, unsigned int *p)
@@ -658,6 +664,11 @@
         return 50;
 
     if (p->buf[0] == '#') {
+        if (p->buf[1] == '!'
+        &&  memstr(p->buf, p->line_len, "bin/calc")) {
+            /* GNU Calc script */
+            return 80;
+        }
         /* same for file starting with '#include' */
         if (strstart(cs8(p->buf), "#include", NULL))
             return 50;



reply via email to

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