diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-10 13:03:36 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-11 01:36:41 -0400 |
commit | a55986ab1887214c316d2d8ffebe38ae0b30483f (patch) | |
tree | 7d2b8014bf072b411b259535520ccbf01da4298e /common.once.head.mk | |
parent | fb52b36bb545194ae25f69968a6374b68cd217bd (diff) |
Makefile: Avoid a bug in Emacs 24 sh-script.el indent
It screws up indent in an `if` block (but not the `then` block).
Diffstat (limited to 'common.once.head.mk')
-rw-r--r-- | common.once.head.mk | 2 |
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 |