aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2020-01-08 15:46:53 -0800
committerGravatar Tom Willemse2020-01-08 15:46:53 -0800
commit9a78612a43a884d8ff7c436294853f54b809a69a (patch)
tree711a6cbb56d9f80adf5f064d56e3fb9ae4c33809
parentb4dc4d0f9f59124d95bef583c470e2b88bf064d7 (diff)
downloademacs-config-9a78612a43a884d8ff7c436294853f54b809a69a.tar.gz
emacs-config-9a78612a43a884d8ff7c436294853f54b809a69a.zip
Fix the bats auto-insert template
Don’t try to add it if it hasn’t been loaded.
-rw-r--r--oni-bats.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/oni-bats.el b/oni-bats.el
index d969f28..f9d69d5 100644
--- a/oni-bats.el
+++ b/oni-bats.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2020.0107.171424
+;; Version: 2020.0108.154614
;; Package-Requires: (bats-mode oni-sh)
;; This program is free software; you can redistribute it and/or modify
@@ -32,7 +32,8 @@
(require 'autoinsert)
;;;###autoload
-(add-to-list 'auto-insert-alist '(bats-mode nil "#!/usr/bin/env bats\n\n"))
+(with-eval-after-load 'autoinsert
+ (add-to-list 'auto-insert-alist '(bats-mode nil "#!/usr/bin/env bats\n\n")))
;;;###autoload(with-eval-after-load 'bats-mode (require 'oni-bats))