From 3719d3e7ad08034f723e8e125b5d6c738b4fb3ce Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 23 Aug 2019 23:00:43 -0700 Subject: Add tests for ‘oni-conf’ --- oni-conf/oni-conf.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'oni-conf') diff --git a/oni-conf/oni-conf.el b/oni-conf/oni-conf.el index c5ff9c1..df09da5 100644 --- a/oni-conf/oni-conf.el +++ b/oni-conf/oni-conf.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 20190613083458 +;; Version: 20190823225821 ;; Package-Requires: (oni-yasnippet) ;; This program is free software; you can redistribute it and/or modify @@ -34,16 +34,19 @@ (buffer-file-name))) "The directory where ‘oni-conf’ was loaded from.") +(defconst oni-conf-snippets-dir + (expand-file-name "snippets" oni-conf-root) + "The director where ‘oni-conf’ stores its snippets.") + ;;;###autoload (defun oni-conf-snippets-initialize () "Initialize the snippets for ‘oni-conf’." - (let ((snippets-dir (expand-file-name "snippets" oni-conf-root))) - (when (boundp 'yas-snippet-dirs) - (add-to-list 'yas-snippet-dirs snippets-dir t)) - (yas-load-directory snippets-dir))) + (when (boundp 'yas-snippet-dirs) + (add-to-list 'yas-snippet-dirs oni-conf-snippets-dir t)) + (yas-load-directory oni-conf-snippets-dir)) ;;;###autoload -(with-eval-after-load 'oni-conf +(with-eval-after-load 'conf-mode (with-eval-after-load 'yasnippet (oni-conf-snippets-initialize))) -- cgit v1.3-2-g0d8e