mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-14 05:23:04 +00:00
Fix issue 187
This commit is contained in:
parent
a20a2e4232
commit
3e2ad14885
11
yasnippet.el
11
yasnippet.el
@ -1672,7 +1672,7 @@ of a snippet. The file name is the trigger key and the
|
|||||||
content of the file is the template."
|
content of the file is the template."
|
||||||
(interactive "DSelect the root directory: ")
|
(interactive "DSelect the root directory: ")
|
||||||
(unless (file-directory-p directory)
|
(unless (file-directory-p directory)
|
||||||
(error "Error %s not a directory" directory))
|
(error "%s is not a directory" directory))
|
||||||
(unless yas/snippet-dirs
|
(unless yas/snippet-dirs
|
||||||
(setq yas/snippet-dirs directory))
|
(setq yas/snippet-dirs directory))
|
||||||
(dolist (dir (yas/subdirs directory))
|
(dolist (dir (yas/subdirs directory))
|
||||||
@ -1696,7 +1696,8 @@ content of the file is the template."
|
|||||||
(let ((restore-global-mode (prog1 yas/global-mode
|
(let ((restore-global-mode (prog1 yas/global-mode
|
||||||
(yas/global-mode -1)))
|
(yas/global-mode -1)))
|
||||||
(restore-minor-mode (prog1 yas/minor-mode
|
(restore-minor-mode (prog1 yas/minor-mode
|
||||||
(yas/minor-mode -1))))
|
(yas/minor-mode -1)))
|
||||||
|
(errors))
|
||||||
;; Empty all snippet tables and all menu tables
|
;; Empty all snippet tables and all menu tables
|
||||||
;;
|
;;
|
||||||
(setq yas/tables (make-hash-table))
|
(setq yas/tables (make-hash-table))
|
||||||
@ -1714,7 +1715,10 @@ content of the file is the template."
|
|||||||
;; Reload the directories listed in `yas/snippet-dirs' or prompt
|
;; Reload the directories listed in `yas/snippet-dirs' or prompt
|
||||||
;; the user to select one.
|
;; the user to select one.
|
||||||
;;
|
;;
|
||||||
|
(condition-case oops
|
||||||
(yas/load-snippet-dirs)
|
(yas/load-snippet-dirs)
|
||||||
|
(error (push oops errors)
|
||||||
|
(message "[yas] Check your `yas/snippet-dirs': %s" (second oops))))
|
||||||
;; Reload the direct keybindings
|
;; Reload the direct keybindings
|
||||||
;;
|
;;
|
||||||
(yas/direct-keymaps-reload)
|
(yas/direct-keymaps-reload)
|
||||||
@ -1724,8 +1728,7 @@ content of the file is the template."
|
|||||||
(yas/minor-mode 1))
|
(yas/minor-mode 1))
|
||||||
(when restore-global-mode
|
(when restore-global-mode
|
||||||
(yas/global-mode 1))
|
(yas/global-mode 1))
|
||||||
|
(message "[yas] Reloaded everything...%s." (if errors " (some errors, check *Messages*)" ""))))
|
||||||
(message "[yas] Reloading everything... Done.")))
|
|
||||||
|
|
||||||
(defun yas/quote-string (string)
|
(defun yas/quote-string (string)
|
||||||
"Escape and quote STRING.
|
"Escape and quote STRING.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user