qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs clang.c latex-mode.c makemode.c perl.c s...


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs clang.c latex-mode.c makemode.c perl.c s...
Date: Thu, 06 Feb 2014 00:22:18 +0000

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        14/02/06 00:22:18

Modified files:
        .              : clang.c latex-mode.c makemode.c perl.c script.c 
                         htmlsrc.c lisp.c orgmode.c qe.c 

Log message:
        fix some mode probe issues
        
        * perform generic test on extension in text_mode_probe
        * allow mode force in language modes by returning 1 instead of 0 in 
probe

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/clang.c?cvsroot=qemacs&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/qemacs/latex-mode.c?cvsroot=qemacs&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/qemacs/makemode.c?cvsroot=qemacs&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/qemacs/perl.c?cvsroot=qemacs&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/qemacs/script.c?cvsroot=qemacs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/qemacs/htmlsrc.c?cvsroot=qemacs&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/qemacs/lisp.c?cvsroot=qemacs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/qemacs/orgmode.c?cvsroot=qemacs&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.144&r2=1.145

Patches:
Index: clang.c
===================================================================
RCS file: /sources/qemacs/qemacs/clang.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- clang.c     31 Jan 2014 14:47:06 -0000      1.46
+++ clang.c     6 Feb 2014 00:22:17 -0000       1.47
@@ -667,7 +667,7 @@
             return 50;
     }
 
-    return 0;
+    return 1;
 }
 
 /* C mode specific commands */

Index: latex-mode.c
===================================================================
RCS file: /sources/qemacs/qemacs/latex-mode.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- latex-mode.c        29 Jan 2014 23:28:40 -0000      1.41
+++ latex-mode.c        6 Feb 2014 00:22:17 -0000       1.42
@@ -140,7 +140,7 @@
     if (match_extension(p->filename, "sty") && p->buf[0] == '%')
         return 80;
 
-    return 0;
+    return 1;
 }
 
 static void do_tex_insert_quote(EditState *s)

Index: makemode.c
===================================================================
RCS file: /sources/qemacs/qemacs/makemode.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- makemode.c  21 Jan 2014 00:01:21 -0000      1.8
+++ makemode.c  6 Feb 2014 00:22:18 -0000       1.9
@@ -151,7 +151,7 @@
     ||  stristart(p->filename, "makefile", NULL))
         return 70;
 
-    return 0;
+    return 1;
 }
 
 /* specific makefile commands */

Index: perl.c
===================================================================
RCS file: /sources/qemacs/qemacs/perl.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- perl.c      20 Jan 2014 18:04:00 -0000      1.11
+++ perl.c      6 Feb 2014 00:22:18 -0000       1.12
@@ -340,7 +340,7 @@
           memstr(p->buf, p->line_len, "bin/perl"))
         return 80;
 
-    return 0;
+    return 1;
 }
 
 /* specific perl commands */

Index: script.c
===================================================================
RCS file: /sources/qemacs/qemacs/script.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- script.c    5 Jan 2014 23:42:54 -0000       1.3
+++ script.c    6 Feb 2014 00:22:18 -0000       1.4
@@ -113,7 +113,7 @@
         if (p->buf[1] == ' ')
             return 30;
     }
-    return 0;
+    return 1;
 }
 
 /* specific script commands */

Index: htmlsrc.c
===================================================================
RCS file: /sources/qemacs/qemacs/htmlsrc.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- htmlsrc.c   20 Jan 2014 18:04:00 -0000      1.7
+++ htmlsrc.c   6 Feb 2014 00:22:18 -0000       1.8
@@ -264,7 +264,7 @@
         return 80;
     }
 
-    return 0;
+    return 1;
 }
 
 /* specific htmlsrc commands */

Index: lisp.c
===================================================================
RCS file: /sources/qemacs/qemacs/lisp.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- lisp.c      20 Jan 2014 18:04:00 -0000      1.5
+++ lisp.c      6 Feb 2014 00:22:18 -0000       1.6
@@ -116,7 +116,7 @@
     ||  strstart(p->filename, ".emacs", NULL))
         return 80;
 
-    return 0;
+    return 1;
 }
 
 /* specific lisp commands */

Index: orgmode.c
===================================================================
RCS file: /sources/qemacs/qemacs/orgmode.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- orgmode.c   5 Feb 2014 00:56:49 -0000       1.12
+++ orgmode.c   6 Feb 2014 00:22:18 -0000       1.13
@@ -664,7 +664,7 @@
     if (match_extension(p->filename, mode->extensions))
         return 80;
 
-    return 0;
+    return 1;
 }
 
 /* Org mode specific commands */

Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -b -r1.144 -r1.145
--- qe.c        5 Feb 2014 00:56:49 -0000       1.144
+++ qe.c        6 Feb 2014 00:22:18 -0000       1.145
@@ -7217,6 +7217,12 @@
 static int text_mode_probe(__unused__ ModeDef *mode,
                            __unused__ ModeProbeData *p)
 {
+    if (mode->extensions) {
+        if (match_extension(p->filename, mode->extensions))
+            return 80;
+        else
+            return 1;
+    }
 #if 0
     /* text mode inappropriate for huge binary files */
     if (detect_binary(p->buf, p->buf_size) && p->total_size > 1000000)



reply via email to

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