summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.dir-locals.el3
-rw-r--r--cfg.mk5
2 files changed, 6 insertions, 2 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
index f24ec617c..d5eba86de 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -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 5cb2ead59..c12f199d0 100644
--- 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\