summaryrefslogtreecommitdiff
path: root/common.once.head.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common.once.head.mk')
-rw-r--r--common.once.head.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/common.once.head.mk b/common.once.head.mk
index d7faab8..33084fa 100644
--- a/common.once.head.mk
+++ b/common.once.head.mk
@@ -42,6 +42,8 @@ edit = sed \
indent = emacs --batch $1 \
--eval '(setq make-backup-files nil)' \
--eval '(setq sh-basic-offset 8)' \
+ --eval '(defun sh-smie-sh-rules--fix (args) "fix bug in Emacs 24 sh-script.el" (if (equal args (list :after "then")) (list :after "if") args))' \
+ --eval "(advice-add 'sh-smie-sh-rules :filter-args \#'sh-smie-sh-rules--fix)" \
--eval '(indent-region (point-min) (point-max) nil)' \
-f save-buffer &>/dev/null