mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
Raise an error when yas/load-directory get a parameter that is not a directory.
This commit is contained in:
parent
2b6dab409c
commit
e6276da02a
@ -1057,8 +1057,9 @@ name. And under each subdirectory, each file is a definition
|
||||
of a snippet. The file name is the trigger key and the
|
||||
content of the file is the template."
|
||||
(interactive "DSelect the root directory: ")
|
||||
(when (file-directory-p directory)
|
||||
(add-to-list 'yas/root-directory directory))
|
||||
(unless (file-directory-p directory)
|
||||
(error "Error %s not a directory" directory))
|
||||
(add-to-list 'yas/root-directory directory)
|
||||
(dolist (dir (yas/directory-files directory nil))
|
||||
(yas/load-directory-1 dir))
|
||||
(when (interactive-p)
|
||||
|
Loading…
x
Reference in New Issue
Block a user