qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs qe.h qe.c makemode.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs qe.h qe.c makemode.c
Date: Sun, 4 Oct 2020 19:57:11 -0400 (EDT)

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        20/10/04 19:57:11

Modified files:
        .              : qe.h qe.c makemode.c 

Log message:
        added macros for default configuration settings:
        
        - #define DEFAULT_TAB_WIDTH  4 /* used to be 8 */
        - #define DEFAULT_INDENT_WIDTH  4 /* used to be 8 */
        - #define DEFAULT_FILL_COLUMN  70

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.h?cvsroot=qemacs&r1=1.274&r2=1.275
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.294&r2=1.295
http://cvs.savannah.gnu.org/viewcvs/qemacs/makemode.c?cvsroot=qemacs&r1=1.30&r2=1.31

Patches:
Index: qe.h
===================================================================
RCS file: /sources/qemacs/qemacs/qe.h,v
retrieving revision 1.274
retrieving revision 1.275
diff -u -b -r1.274 -r1.275
--- qe.h        28 May 2019 04:30:56 -0000      1.274
+++ qe.h        4 Oct 2020 23:57:11 -0000       1.275
@@ -41,6 +41,16 @@
 #include "config.h"
 #endif
 
+#ifndef DEFAULT_TAB_WIDTH
+#define DEFAULT_TAB_WIDTH  4 /* used to be 8 */
+#endif
+#ifndef DEFAULT_INDENT_WIDTH
+#define DEFAULT_INDENT_WIDTH  4 /* used to be 8 */
+#endif
+#ifndef DEFAULT_FILL_COLUMN
+#define DEFAULT_FILL_COLUMN  70
+#endif
+
 /* OS specific defines */
 
 #ifdef CONFIG_WIN32
@@ -1708,8 +1718,8 @@
     int hilite_region;  /* hilite the current region when selecting */
     int mmap_threshold; /* minimum file size for mmap */
     int max_load_size;  /* maximum file size for loading in memory */
-    int default_tab_width;      /* 8 */
-    int default_fill_column;    /* 70 */
+    int default_tab_width;      /* DEFAULT_TAB_WIDTH */
+    int default_fill_column;    /* DEFAULT_FILL_COLUMN */
     EOLType default_eol_type;  /* EOL_UNIX */
     int flag_split_window_change_focus;
     int emulation_flags;

Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.294
retrieving revision 1.295
diff -u -b -r1.294 -r1.295
--- qe.c        28 May 2019 04:26:14 -0000      1.294
+++ qe.c        4 Oct 2020 23:57:11 -0000       1.295
@@ -1741,7 +1741,7 @@
         int offset = s->offset;
         int offset0 = eb_goto_bol(s->b, offset);
         int col = 0;
-        int tw = s->b->tab_width > 0 ? s->b->tab_width : 8;
+        int tw = s->b->tab_width > 0 ? s->b->tab_width : DEFAULT_TAB_WIDTH;
         int indent = s->indent_size > 0 ? s->indent_size : tw;
 
         while (offset0 < offset) {
@@ -8973,8 +8973,8 @@
     qs->argv = argv;
 
     qs->hilite_region = 1;
-    qs->default_tab_width = 8;
-    qs->default_fill_column = 70;
+    qs->default_tab_width = DEFAULT_TAB_WIDTH;
+    qs->default_fill_column = DEFAULT_FILL_COLUMN;
     qs->mmap_threshold = MIN_MMAP_SIZE;
     qs->max_load_size = MAX_LOAD_SIZE;
 

Index: makemode.c
===================================================================
RCS file: /sources/qemacs/qemacs/makemode.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- makemode.c  29 May 2017 06:21:42 -0000      1.30
+++ makemode.c  4 Oct 2020 23:57:11 -0000       1.31
@@ -145,6 +145,7 @@
 static int makefile_mode_init(EditState *s, EditBuffer *b, int flags)
 {
     if (s) {
+        /* XXX: should use the default values from mode variables */
         s->b->tab_width = 8;
         s->indent_tabs_mode = 1;
     }



reply via email to

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