From 9a78612a43a884d8ff7c436294853f54b809a69a Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 8 Jan 2020 15:46:53 -0800 Subject: Fix the bats auto-insert template Don’t try to add it if it hasn’t been loaded. --- oni-bats.el | 5 +++-- 1 file 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 ;; 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)) -- cgit v1.2.3-54-g00ecf