[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] global: convert indentation-TABs to spaces
From: |
Jim Meyering |
Subject: |
[PATCH 1/2] global: convert indentation-TABs to spaces |
Date: |
Wed, 03 Feb 2010 10:24:57 +0100 |
I've just pushed this:
>From 3ea7fe86ac3c1a887038e0e3e1c07ba4634ad1a5 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 3 Feb 2010 08:53:02 +0100
Subject: [PATCH 1/2] global: convert indentation-TABs to spaces
Transformed via this shell code:
t=$'\t'
git ls-files \
| grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \
| grep -vE 'tests/pr/|help2man' \
| xargs grep -lE "^ *$t" \
| xargs perl -MText::Tabs -ni -le \
'$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
---
.gitmodules | 4 +-
README | 2 +-
README-hacking | 10 +-
amiga/match.a | 198 ++++----
bits.c | 6 +-
configure.ac | 32 +-
deflate.c | 20 +-
gzip.c | 1198 +++++++++++++++++++++++-----------------------
gzip.h | 18 +-
inflate.c | 22 +-
lib/match.c | 510 ++++++++++----------
m4/shell.m4 | 74 ++--
msdos/match.asm | 74 ++--
msdos/tailor.c | 4 +-
primos/include/sysStat.h | 32 +-
sample/zread.c | 24 +-
sample/ztouch | 4 +-
tailor.h | 2 +-
trees.c | 4 +-
unlzh.c | 248 +++++-----
unlzw.c | 284 ++++++------
unpack.c | 98 ++--
unzip.c | 126 +++---
util.c | 96 ++--
vms/Readme.vms | 18 +-
vms/gzip.hlp | 6 +-
vms/vms.c | 76 ++--
zdiff.in | 134 +++---
zgrep.in | 26 +-
zip.c | 22 +-
zmore.in | 48 +-
znew.in | 10 +-
32 files changed, 1715 insertions(+), 1715 deletions(-)
...
>From ec347e5ed8daee2fe0c34a23fb13633918e99503 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 3 Feb 2010 09:21:02 +0100
Subject: [PATCH 2/2] maint: teach "make syntax-check" the space-only
indentation rule
* cfg.mk (sc_prohibit_tab_based_indentation): New rule, from coreutils.
(sc_prohibit_emacs__indent_tabs_mode__setting): Likewise.
* bootstrap: Remove "indent-tabs-mode: nil" directive.
* .x-sc_prohibit_tab_based_indentation: New file.
---
.x-sc_prohibit_tab_based_indentation | 3 +++
bootstrap | 4 ----
cfg.mk | 12 ++++++++++++
3 files changed, 15 insertions(+), 4 deletions(-)
create mode 100644 .x-sc_prohibit_tab_based_indentation
diff --git a/.x-sc_prohibit_tab_based_indentation
b/.x-sc_prohibit_tab_based_indentation
new file mode 100644
index 0000000..13276eb
--- /dev/null
+++ b/.x-sc_prohibit_tab_based_indentation
@@ -0,0 +1,3 @@
+(^|/)(GNU)?[Mm]akefile
+(^|/)ChangeLog
+\.(am|mk)$
diff --git a/bootstrap b/bootstrap
index 456b0b2..7136875 100755
--- a/bootstrap
+++ b/bootstrap
@@ -806,7 +806,3 @@ fi
bootstrap_epilogue
echo "$0: done. Now you can run './configure'."
-
-# Local Variables:
-# indent-tabs-mode: nil
-# End:
diff --git a/cfg.mk b/cfg.mk
index b8d4644..136c96c 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -49,3 +49,15 @@ sc_prohibit_obsolete_HAVE_HEADER_H:
update-copyright-env = \
UPDATE_COPYRIGHT_USE_INTERVALS=1 \
UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
+
+# Indent only with spaces.
+sc_prohibit_tab_based_indentation:
+ @re='^ * ' \
+ msg='TAB in indentation; use only spaces' \
+ $(_prohibit_regexp)
+
+# Don't use "indent-tabs-mode: nil" anymore. No longer needed.
+sc_prohibit_emacs__indent_tabs_mode__setting:
+ @re='^( *[*#] *)?indent-tabs-mode:' \
+ msg='use of emacs indent-tabs-mode: setting' \
+ $(_prohibit_regexp)
--
1.7.0.rc1.167.gdb08
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 1/2] global: convert indentation-TABs to spaces,
Jim Meyering <=