[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master e1ed662 125/177: Allow jit loading interactively
From: |
João Távora |
Subject: |
[elpa] master e1ed662 125/177: Allow jit loading interactively |
Date: |
Sat, 28 Mar 2015 15:41:23 +0000 |
branch: master
commit e1ed662b7ca235d3feffe714280433ea25c83e9c
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Allow jit loading interactively
* yasnippet.el (yas-reload-all, yas-load-directory): let a prefix
argument indicate jit loading.
---
yasnippet.el | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/yasnippet.el b/yasnippet.el
index b4432b8..d0129b9 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -1697,8 +1697,10 @@ the current buffers contents."
Below TOP-LEVEL-DIR each directory should be a mode name.
-Optional USE-JIT use jit-loading of snippets."
- (interactive "DSelect the root directory: ni\np")
+With prefix argument USE-JIT do jit-loading of snippets."
+ (interactive
+ (list (read-directory-name "Select the root directory: " nil nil t)
+ current-prefix-arg t))
(unless yas-snippet-dirs
(setq yas-snippet-dirs top-level-dir))
(dolist (dir (yas--subdirs top-level-dir))
@@ -1791,13 +1793,16 @@ prompt the user to select one."
(call-interactively 'yas-load-directory))
errors))
-(defun yas-reload-all (&optional interactive)
+(defun yas-reload-all (&optional no-jit interactive)
"Reload all snippets and rebuild the YASnippet menu.
-When called interactively force immediate reload of all known
+When NO-JIT is non-nil force immediate reload of all known
snippets under `yas-snippet-dirs', otherwise use just-in-time
-loading."
- (interactive "p")
+loading.
+
+When called interactively, use just-in-time loading when given a
+prefix argument."
+ (interactive (list (not current-prefix-arg) t))
(catch 'abort
(let ((errors)
(snippet-editing-buffers
@@ -1842,14 +1847,14 @@ loading."
;; Reload the directories listed in `yas-snippet-dirs' or prompt
;; the user to select one.
;;
- (setq errors (yas--load-snippet-dirs interactive))
+ (setq errors (yas--load-snippet-dirs no-jit))
;; Reload the direct keybindings
;;
(yas-direct-keymaps-reload)
(run-hooks 'yas-after-reload-hook)
(yas--message 3 "Reloaded everything%s...%s."
- (if interactive "" " (snippets will load just-in-time)")
+ (if no-jit "" " (snippets will load just-in-time)")
(if errors " (some errors, check *Messages*)" "")))))
(defvar yas-after-reload-hook nil
- [elpa] master 599a262 113/177: Closes #474: fix cc-mode fontification conflict, (continued)
- [elpa] master 599a262 113/177: Closes #474: fix cc-mode fontification conflict, João Távora, 2015/03/28
- [elpa] master a80033d 115/177: Refactor yas-good-grace error handling, João Távora, 2015/03/28
- [elpa] master 4d9eee9 111/177: Simpler, more effective .travis file, João Távora, 2015/03/28
- [elpa] master 4473b4e 112/177: New test for cc-mode's fontification functions, João Távora, 2015/03/28
- [elpa] master 8ced5c7 117/177: Remove type, expand-env from new snippet value, João Távora, 2015/03/28
- [elpa] master 4ccf133 114/177: Merge pull request #476 from npostavs/cc-fontify2, João Távora, 2015/03/28
- [elpa] master f176027 118/177: Restore backquotes lost in rst -> org translation, João Távora, 2015/03/28
- [elpa] master 580e5c6 116/177: Don't lose error message when yas-good-grace is t, João Távora, 2015/03/28
- [elpa] master 4c16eae 119/177: Document uuid directive, João Távora, 2015/03/28
- [elpa] master fe288a1 121/177: Fix publishing with org 7.9, João Távora, 2015/03/28
- [elpa] master e1ed662 125/177: Allow jit loading interactively,
João Távora <=
- [elpa] master e53ec1e 124/177: Make snippets submodule track master, update it, João Távora, 2015/03/28
- [elpa] master f98c527 123/177: Replace text -> yas-text in documentation, João Távora, 2015/03/28
- [elpa] master 763f5fa 122/177: Closes #474: fix more cc-mode font-lock conflicts, João Távora, 2015/03/28
- [elpa] master 2b24aea 126/177: Merge pull request #493 from npostavs/ijit, João Távora, 2015/03/28
- [elpa] master 280ece2 131/177: Add yas-shortest-key-until-whitespace, João Távora, 2015/03/28
- [elpa] master 0b7b34a 127/177: Closes #492, closes #494: Consider defalias when calculating parent modes, João Távora, 2015/03/28
- [elpa] master 7761dee 128/177: Closes #497: Allow functions as elements in yas-key-syntaxes, João Távora, 2015/03/28
- [elpa] master faed106 129/177: * yasnippet.el (yas-key-syntaxes): Improve documentation., João Távora, 2015/03/28
- [elpa] master de34d91 130/177: Closes #470, handle non-whitespace newlines, João Távora, 2015/03/28
- [elpa] master 6b04dad 120/177: Document type directive, João Távora, 2015/03/28