diff options
author | 2020-04-07 21:40:06 -0700 | |
---|---|---|
committer | 2020-04-07 21:40:06 -0700 | |
commit | a8b95ba858abd996e8cea29a952a75c152d8802c (patch) | |
tree | 5f30013ec0d816b4da23a3cd52d04905a7116d8b /oni-bats.el | |
parent | 23a23d3c1b85b0ae5334e4571aad2648e6fdb0b5 (diff) | |
download | emacs-config-a8b95ba858abd996e8cea29a952a75c152d8802c.tar.gz emacs-config-a8b95ba858abd996e8cea29a952a75c152d8802c.zip |
Disable ‘shfmt-on-save-mode’ for ‘bats-mode’ buffers
Diffstat (limited to 'oni-bats.el')
-rw-r--r-- | oni-bats.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/oni-bats.el b/oni-bats.el index f9d69d5..c4b49c1 100644 --- a/oni-bats.el +++ b/oni-bats.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse <tom@ryuslash.org> ;; Keywords: local -;; Version: 2020.0108.154614 +;; Version: 2020.0407.213908 ;; Package-Requires: (bats-mode oni-sh) ;; This program is free software; you can redistribute it and/or modify @@ -30,6 +30,13 @@ ;;; Code: (require 'autoinsert) +(require 'oni-sh) + +(defun oni-bats-disable-shfmt-on-save-mode () + "Disable ‘shfmt-on-save-mode’." + (shfmt-on-save-mode -1)) + +(add-hook 'bats-mode-hook #'oni-bats-disable-shfmt-on-save-mode) ;;;###autoload (with-eval-after-load 'autoinsert |