[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master f7ef023 137/177: Prevent disabling errors from recent `yas
From: |
João Távora |
Subject: |
[elpa] master f7ef023 137/177: Prevent disabling errors from recent `yas-current-syntaxes` logic |
Date: |
Sat, 28 Mar 2015 15:41:27 +0000 |
branch: master
commit f7ef023ebb746ee1597b20d6770fffd106c802f4
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Prevent disabling errors from recent `yas-current-syntaxes` logic
* yasnippet.el (yas--templates-for-key-at-point): Don't error
since this function is called very frequently on TAB. Use new
`yas--warning'.
(yas--warning): New function.
---
yasnippet.el | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/yasnippet.el b/yasnippet.el
index ea5fe33..821e748 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -1243,7 +1243,7 @@ Returns (TEMPLATES START END). This function respects
'again)
(setq methods (cdr methods))))
(t
- (error "[yas] invalid element in `yas-key-syntaxes'")))
+ (yas--warning "Warning invalid element %s in
`yas-key-syntaxes'" method)))
(setq templates
(mapcan #'(lambda (table)
(yas--fetch table (buffer-substring-no-properties
(point)
@@ -4366,6 +4366,11 @@ object satisfying `yas--field-p' to restrict the
expansion to.")))
(when (> yas-verbosity level)
(message "%s" (apply #'yas--format message args))))
+(defun yas--warning (format-control &rest format-args)
+ (let ((msg (apply #'format format-control format-args)))
+ (display-warning 'yasnippet msg :warning)
+ (yas--message 1 msg)))
+
(defun yas--format (format-control &rest format-args)
(apply #'format (concat "[yas] " format-control) format-args))
- [elpa] master 280ece2 131/177: Add yas-shortest-key-until-whitespace, (continued)
- [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
- [elpa] master 10ecde1 132/177: Pass start point to yas-key-syntaxes functions, João Távora, 2015/03/28
- [elpa] master 47a3d5f 134/177: Fix yas-key-syntaxes example functions docstrings., João Távora, 2015/03/28
- [elpa] master d982b70 135/177: Fix edge case in yas-longest-key-from-whitespace, João Távora, 2015/03/28
- [elpa] master 5d10b5d 133/177: Add yas-longest-key-from-whitespace, João Távora, 2015/03/28
- [elpa] master f7ef023 137/177: Prevent disabling errors from recent `yas-current-syntaxes` logic,
João Távora <=
- [elpa] master 1d4618b 138/177: Closes #504: Correctly discover buffers needing snippets immediately, João Távora, 2015/03/28
- [elpa] master e60e8b5 136/177: Merge pull request #503 from npostavs/key-syntaxes, João Távora, 2015/03/28
- [elpa] master 5b59b80 139/177: Closes #495: Allow symbols as aliases in `yas-snippet-dirs', João Távora, 2015/03/28
- [elpa] master be2f815 140/177: Closes #508: Ensure original point when evaluating conditions, João Távora, 2015/03/28
- [elpa] master 241465c 141/177: move eof footer to the actual eof, João Távora, 2015/03/28
- [elpa] master 70de821 143/177: enforce use of spaces for indentation, João Távora, 2015/03/28
- [elpa] master 41cb5f5 145/177: Update snippets submodule, João Távora, 2015/03/28
- [elpa] master cc64ff6 144/177: Merge pull request #514 from tarsius/master, João Távora, 2015/03/28
- [elpa] master 8e9bf3c 147/177: Merge pull request #518 from rnkn/master, João Távora, 2015/03/28
- [elpa] master 6f7c915 146/177: Compatibility with custom-unlispify-remove-prefixes, João Távora, 2015/03/28