From 2a5d555bcef7479cc8c10849938e4eb96af922ee Mon Sep 17 00:00:00 2001 From: Maciej Barć Date: Sun, 6 Oct 2024 21:44:18 +0200 Subject: fix(ebuild-snippets): account for yas-snippet-dirs being a string and not a list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maciej Barć --- ebuild-snippets.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-65-gdbad