aboutsummaryrefslogtreecommitdiffstats
path: root/oni-conf/oni-conf.el
diff options
context:
space:
mode:
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)))