tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] [PATCH] Make (x)emacs automatically honour Fabrice's


From: Fabrice Bellard
Subject: Re: [Tinycc-devel] [PATCH] Make (x)emacs automatically honour Fabrice's 4 space indentation
Date: Sun, 13 Apr 2003 16:40:34 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.1) Gecko/20020828

Hi,

I am not used to add emacs specific code in my sources. I think it is better that the user adds a specific emacs command. So unless more people want it, I won't commit this.

Fabrice.


Peter "Firefly" Lund wrote:
Fabrice uses an indentation of four spaces, whereas (x)emacs uses 2 by
default.  An unintrusive way to solve this is to add this little section
to the end of all the important source files:


/*
Local Variables:
c-basic-offset: 4
End:
*/

(x)emacs looks in the last 3000 bytes every time it loads a new file for
a block like this with local settings for that particular file.  The block
must begin with a line that contains Local Variables: and end with End:.
The start and end-delimiting lines and all the lines in between must have
the same prefix and suffix.  In other words, this would also be ok:

/* Local Variables:  */
/* c-basic-offset: 4 */
/* End:              */

But not:

/* Local Variables:
   c-basic-offset: 4
   End:
*/

-Peter

 bcheck.c      |    6 ++++++
 boundtest.c   |    7 +++++++
 i386-asm.c    |    6 ++++++
 i386-asm.h    |    6 ++++++
 i386-gen.c    |    6 ++++++
 libtcc1.c     |    6 ++++++
 libtcc_test.c |    6 ++++++
 tccasm.c      |    5 +++++
 tccelf.c      |    6 ++++++
 tcctest.c     |    7 +++++++
 tcctok.h      |    7 +++++++
 11 files changed, 68 insertions(+)

diff -X xfiles -u tcc-3c/bcheck.c tcc-3d/bcheck.c
--- tcc-3c/bcheck.c     Thu Mar  6 23:54:50 2003
+++ tcc-3d/bcheck.c     Fri Mar  7 01:14:36 2003
@@ -877,3 +877,9 @@
     return __bound_memcpy(dst, src, len + 1);
 }

+
+/*
+Local Variables:
+c-basic-offset: 4
+End:
+*/
diff -X xfiles -u tcc-3c/boundtest.c tcc-3d/boundtest.c
--- tcc-3c/boundtest.c  Thu Mar  6 23:54:50 2003
+++ tcc-3d/boundtest.c  Fri Mar  7 01:16:21 2003
@@ -212,3 +212,10 @@
  * without bound   0.77 s
  * with bounds    4.73
  */
+
+
+/*
+Local Variables:
+c-basic-offset: 4
+End:
+*/
diff -X xfiles -u tcc-3c/i386-asm.c tcc-3d/i386-asm.c
--- tcc-3c/i386-asm.c   Thu Mar  6 23:54:50 2003
+++ tcc-3d/i386-asm.c   Fri Mar  7 01:13:03 2003
@@ -1075,3 +1075,9 @@
     }
     clobber_regs[reg] = 1;
 }
+
+/*
+Local Variables:
+c-basic-offset: 4
+End:
+*/
diff -X xfiles -u tcc-3c/i386-asm.h tcc-3d/i386-asm.h
--- tcc-3c/i386-asm.h   Thu Mar  6 23:54:50 2003
+++ tcc-3d/i386-asm.h   Fri Mar  7 01:13:17 2003
@@ -442,3 +442,9 @@
 #undef DEF_ASM_OP1
 #undef DEF_ASM_OP2
 #undef DEF_ASM_OP3
+
+/*
+Local Variables:
+c-basic-offset: 4
+End:
+*/
diff -X xfiles -u tcc-3c/i386-gen.c tcc-3d/i386-gen.c
--- tcc-3c/i386-gen.c   Thu Mar  6 23:54:50 2003
+++ tcc-3d/i386-gen.c   Fri Mar  7 01:13:25 2003
@@ -951,3 +951,9 @@

 /* end of X86 code generator */
 /*************************************************************/
+
+/*
+Local Variables:
+c-basic-offset: 4
+End:
+*/
diff -X xfiles -u tcc-3c/libtcc1.c tcc-3d/libtcc1.c
--- tcc-3c/libtcc1.c    Thu Mar  6 23:54:50 2003
+++ tcc-3d/libtcc1.c    Fri Mar  7 01:15:58 2003
@@ -561,3 +561,9 @@
         return 0;
 }

+
+/*
+Local Variables:
+c-basic-offset: 4
+End:
+*/
diff -X xfiles -u tcc-3c/libtcc_test.c tcc-3d/libtcc_test.c
--- tcc-3c/libtcc_test.c        Thu Mar  6 23:54:50 2003
+++ tcc-3d/libtcc_test.c        Fri Mar  7 01:17:11 2003
@@ -61,3 +61,9 @@
     tcc_delete(s);
     return 0;
 }
+
+/*
+Local Variables:
+c-basic-offset: 4
+End:
+*/
diff -X xfiles -u tcc-3c/tccasm.c tcc-3d/tccasm.c
--- tcc-3c/tccasm.c     Thu Mar  6 23:54:50 2003
+++ tcc-3d/tccasm.c     Fri Mar  7 01:13:06 2003
@@ -742,3 +742,8 @@
     cstr_free(&astr1);
 }

+/*
+Local Variables:
+c-basic-offset: 4
+End:
+*/
diff -X xfiles -u tcc-3c/tccelf.c tcc-3d/tccelf.c
--- tcc-3c/tccelf.c     Thu Mar  6 23:54:50 2003
+++ tcc-3d/tccelf.c     Fri Mar  7 01:13:05 2003
@@ -1937,3 +1937,9 @@
     }
     return 0;
 }
+
+/*
+Local Variables:
+c-basic-offset: 4
+End:
+*/
diff -X xfiles -u tcc-3c/tcctest.c tcc-3d/tcctest.c
--- tcc-3c/tcctest.c    Thu Mar  6 23:54:50 2003
+++ tcc-3d/tcctest.c    Fri Mar  7 01:17:55 2003
@@ -1838,3 +1838,10 @@
 }

 #endif
+
+
+/*
+Local Variables:
+c-basic-offset: 4
+End:
+*/
diff -X xfiles -u tcc-3c/tcctok.h tcc-3d/tcctok.h
--- tcc-3c/tcctok.h     Thu Mar  6 23:54:50 2003
+++ tcc-3d/tcctok.h     Fri Mar  7 01:14:15 2003
@@ -366,3 +366,10 @@
 #include "i386-asm.h"

 #endif
+
+
+/*
+Local Variables:
+c-basic-offset: 4
+End:
+*/


_______________________________________________
Tinycc-devel mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/tinycc-devel




--
Fabrice.





reply via email to

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