aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2024-10-06 21:44:18 +0200
committerMaciej Barć <xgqt@gentoo.org>2024-10-06 21:44:18 +0200
commit2a5d555bcef7479cc8c10849938e4eb96af922ee (patch)
tree78cba11af9135ccba400368d86abb4c8835ca719
parentpyproject.toml: cleanup (diff)
downloademacs-ebuild-snippets-master.tar.gz
emacs-ebuild-snippets-master.tar.bz2
emacs-ebuild-snippets-master.zip
fix(ebuild-snippets): account for yas-snippet-dirs being a string and not a listHEADmaster
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
-rw-r--r--ebuild-snippets.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/ebuild-snippets.el b/ebuild-snippets.el
index fccb40d..a16b14f 100644
--- a/ebuild-snippets.el
+++ b/ebuild-snippets.el
@@ -78,7 +78,12 @@
;;;###autoload
(defun ebuild-snippets-initialize ()
"Ebuild-Snippets initialization."
- (add-to-list 'yas-snippet-dirs ebuild-snippets-directory t)
+ ;; Because `yas-snippet-dirs' may be a string.
+ (cond
+ ((listp yas-snippet-dirs)
+ (add-to-list 'yas-snippet-dirs ebuild-snippets-directory t))
+ (t
+ (setq yas-snippet-dirs (list yas-snippet-dirs ebuild-snippets-directory))))
(yas-load-directory ebuild-snippets-directory))
;;;###autoload