Skip to content

Commit 9857135

Browse files
authored
*yasnippet-snippets.el: avoid duplicate loading the snippets (#468)
1 parent a98c5de commit 9857135

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

yasnippet-snippets.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@
4949
;; NOTE: we add the symbol `yasnippet-snippets-dir' rather than its
5050
;; value, so that yasnippet will automatically find the directory
5151
;; after this package is updated (i.e., moves directory).
52-
(add-to-list 'yas-snippet-dirs 'yasnippet-snippets-dir t)
53-
(yas--load-snippet-dirs))
52+
(unless (member 'yasnippet-snippets-dir yas-snippet-dirs)
53+
(add-to-list 'yas-snippet-dirs 'yasnippet-snippets-dir t)
54+
(yas--load-snippet-dirs)))
5455

5556
(defgroup yasnippet-snippets nil
5657
"Options for yasnippet setups.

0 commit comments

Comments
 (0)