aboutsummaryrefslogtreecommitdiffstats
path: root/oni-conf/oni-conf.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2019-08-23 23:00:43 -0700
committerGravatar Tom Willemse2019-08-23 23:00:43 -0700
commit3719d3e7ad08034f723e8e125b5d6c738b4fb3ce (patch)
treea538437e0a91c0558366d2231d8e69e8f53764a2 /oni-conf/oni-conf.el
parenta86af3f8fa2ca2a6ce964099b6dae0a866d2bf41 (diff)
downloademacs-config-3719d3e7ad08034f723e8e125b5d6c738b4fb3ce.tar.gz
emacs-config-3719d3e7ad08034f723e8e125b5d6c738b4fb3ce.zip
Add tests for ‘oni-conf’
Diffstat (limited to 'oni-conf/oni-conf.el')
-rw-r--r--oni-conf/oni-conf.el15
1 files changed, 9 insertions, 6 deletions
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 <tom@ryuslash.org>
;; 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)))