Fix silly mistake in previous commit

* yasnippet.el (yas--load-snippet-dirs): Put `make-directory' call in
  same branch of the `if' as the `dolist' loop.
This commit is contained in:
Noam Postavsky 2016-01-20 09:44:28 -05:00
parent 46256db43d
commit 1a98c38d9c

View File

@ -1805,7 +1805,8 @@ With prefix argument USE-JIT do jit-loading of snippets."
"Reload the directories listed in `yas-snippet-dirs' or
prompt the user to select one."
(let (errors)
(if yas-snippet-dirs
(if (null yas-snippet-dirs)
(call-interactively 'yas-load-directory)
(when (member yas--default-user-snippets-dir yas-snippet-dirs)
(make-directory yas--default-user-snippets-dir t))
(dolist (directory (reverse (yas-snippet-dirs)))
@ -1815,8 +1816,7 @@ prompt the user to select one."
(yas--message 3 "Loaded %s" directory)
(yas--message 3 "Prepared just-in-time loading for %s" directory)))
(t
(push (yas--message 0 "Check your `yas-snippet-dirs': %s is not a directory" directory) errors))))
(call-interactively 'yas-load-directory))
(push (yas--message 0 "Check your `yas-snippet-dirs': %s is not a directory" directory) errors)))))
errors))
(defun yas-reload-all (&optional no-jit interactive)