]> xenbits.xensource.com Git - libvirt.git/commitdiff
maint: make spacing in .sh files easier
authorEric Blake <eblake@redhat.com>
Mon, 14 Mar 2011 14:36:26 +0000 (08:36 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 15 Mar 2011 03:57:42 +0000 (21:57 -0600)
Commit 7f193757 renamed libvirt-guests.init from .in to .sh, which
made it slip past sc_TAB_in_indentation.  I nearly reintroduced a
tab, so I'm pushing this to prevent that from happening.

* cfg.mk (sc_TAB_in_indentation): Update rule to include .sh files.
* .dir-locals.el: List spacing preference for .sh files.

.dir-locals.el
cfg.mk

index f24ec617c943ee698c9712c811c060c1201b3909..d5eba86de85aee7f9b2cf27416ed14284a102899 100644 (file)
@@ -8,4 +8,7 @@
  (html-mode . (
               (indent-tabs-mode . nil)
               ))
+ (sh-mode . (
+            (indent-tabs-mode . nil)
+            ))
  )
diff --git a/cfg.mk b/cfg.mk
index 5cb2ead59dda77ea27e571fb3229584ec9fe55a5..c12f199d0d5fb5670ff1504dd7dc4d8669e9ac84 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -327,10 +327,11 @@ sc_prohibit_ctype_h:
 # Ensure that no C source file, docs, or rng schema uses TABs for
 # indentation.  Also match *.h.in files, to get libvirt.h.in.  Exclude
 # files in gnulib, since they're imported.
+space_indent_files=(\.(rng|s?[ch](\.in)?|html.in|py)|(daemon|tools)/.*\.in)
 sc_TAB_in_indentation:
        @prohibit='^ *  '                                               \
-       in_vc_files='(\.(rng|[ch](\.in)?|html.in|py)|(daemon|tools)/.*\.in)$$' \
-       halt='use leading spaces, not TAB, in C, sh, html, py, and RNG schemas' \
+       in_vc_files='$(space_indent_files)$$'                           \
+       halt='indent with space, not TAB, in C, sh, html, py, and RNG schemas' \
          $(_sc_search_regexp)
 
 ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\