From fad1018b1bd330fbc444dc9e151a8e50e48712fa Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 7 Sep 2020 15:11:27 -0700 Subject: Only add the auto-insert template when ‘autoinsert’ is loaded --- oni-csharp/oni-csharp.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'oni-csharp') diff --git a/oni-csharp/oni-csharp.el b/oni-csharp/oni-csharp.el index 07ab27e..370c256 100644 --- a/oni-csharp/oni-csharp.el +++ b/oni-csharp/oni-csharp.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2020.0907.144202 +;; Version: 2020.0907.151110 ;; Package-Requires: (csharp-mode oni-company oni-flycheck oni-yasnippet oni-hydra oni-fci oni-lsp smartparens) ;; This program is free software; you can redistribute it and/or modify @@ -170,10 +170,11 @@ _cs_: Solution ;;;###autoload (add-to-list 'auto-mode-alist '("\\.csproj\\'" . nxml-mode)) -(add-to-list 'auto-insert-alist - `(,(rx ".proj" string-end) - nil - "\n " _ "\n")) +(with-eval-after-load 'autoinsert + (add-to-list 'auto-insert-alist + `(,(rx ".proj" string-end) + nil + "\n " _ "\n"))) ;;;###autoload (with-eval-after-load 'csharp-mode -- cgit v1.2.3-54-g00ecf