qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs html.c qe.c qe.h variables.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs html.c qe.c qe.h variables.c
Date: Thu, 22 Jun 2017 18:02:26 -0400 (EDT)

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

Modified files:
        .              : html.c qe.c qe.h variables.c 

Log message:
        html-mode: add global variable to enable/disable mode
        - add use_html global variable
        - default value is 1, set to 0 in ~/.qe/config to disable html parser

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/html.c?cvsroot=qemacs&r1=1.45&r2=1.46
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.288&r2=1.289
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.h?cvsroot=qemacs&r1=1.269&r2=1.270
http://cvs.savannah.gnu.org/viewcvs/qemacs/variables.c?cvsroot=qemacs&r1=1.23&r2=1.24

Patches:
Index: html.c
===================================================================
RCS file: /sources/qemacs/qemacs/html.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- html.c      8 May 2017 10:47:23 -0000       1.45
+++ html.c      22 Jun 2017 22:02:25 -0000      1.46
@@ -864,6 +864,9 @@
 
     score = 0;
 
+    if (!use_html)
+        return 0;
+
     while (qe_isspace(*p))
         p++;
     if (*p != '<')

Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.288
retrieving revision 1.289
diff -u -b -r1.288 -r1.289
--- qe.c        21 May 2017 08:10:37 -0000      1.288
+++ qe.c        22 Jun 2017 22:02:25 -0000      1.289
@@ -73,6 +73,7 @@
 static int single_window;
 int force_tty;
 int use_session_file;
+int use_html = 1;
 #ifndef CONFIG_TINY
 static int free_everything;
 #endif

Index: qe.h
===================================================================
RCS file: /sources/qemacs/qemacs/qe.h,v
retrieving revision 1.269
retrieving revision 1.270
diff -u -b -r1.269 -r1.270
--- qe.h        29 May 2017 06:21:42 -0000      1.269
+++ qe.h        22 Jun 2017 22:02:25 -0000      1.270
@@ -2338,6 +2338,7 @@
 /* html.c */
 
 extern ModeDef html_mode;  /* used in docbook_mode */
+extern int use_html;
 
 /* flags from libqhtml/css.h */
 int gxml_mode_init(EditBuffer *b, int flags, const char *default_stylesheet);

Index: variables.c
===================================================================
RCS file: /sources/qemacs/qemacs/variables.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- variables.c 25 Mar 2017 18:15:01 -0000      1.23
+++ variables.c 22 Jun 2017 22:02:25 -0000      1.24
@@ -78,6 +78,7 @@
 
     G_VAR( "use-session-file", use_session_file, VAR_NUMBER, VAR_RW )
     G_VAR( "force-tty", force_tty, VAR_NUMBER, VAR_RW )
+    G_VAR( "use-html", use_html, VAR_NUMBER, VAR_RW )
 
     /* more buffer fields: modified, readonly, binary, charset */
 



reply via email to

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