[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master be2f815 140/177: Closes #508: Ensure original point when e
From: |
João Távora |
Subject: |
[elpa] master be2f815 140/177: Closes #508: Ensure original point when evaluating conditions |
Date: |
Sat, 28 Mar 2015 15:41:29 +0000 |
branch: master
commit be2f815c43deb74e0f809ed47debc4aa2e67ea1e
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Closes #508: Ensure original point when evaluating conditions
* yasnippet.el (yas--templates-for-key-at-point): Call
`yas--fetch', and hence condition system, with point in the
original position.
---
yasnippet.el | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/yasnippet.el b/yasnippet.el
index c25d78d..f26cc3f 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -1257,11 +1257,13 @@ Returns (TEMPLATES START END). This function respects
(setq methods (cdr methods))))
(t
(yas--warning "Warning invalid element %s in
`yas-key-syntaxes'" method)))
- (setq templates
- (mapcan #'(lambda (table)
- (yas--fetch table (buffer-substring-no-properties
(point)
-
original)))
- (yas--get-snippet-tables))))
+ (let ((possible-key (buffer-substring-no-properties (point) original)))
+ (save-excursion
+ (goto-char original)
+ (setq templates
+ (mapcan #'(lambda (table)
+ (yas--fetch table possible-key))
+ (yas--get-snippet-tables))))))
(when templates
(list templates (point) original)))))
- [elpa] master de34d91 130/177: Closes #470, handle non-whitespace newlines, (continued)
- [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, 2015/03/28
- [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 <=
- [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
- [elpa] master 783cc33 148/177: Use cl-incf instead of cl, João Távora, 2015/03/28
- [elpa] master 08b044e 149/177: Merge pull request #519 from syohex/use-cl-macro, João Távora, 2015/03/28
- [elpa] master e731451 150/177: Signal an error on recursive yas--fallback calls, João Távora, 2015/03/28
- [elpa] master 6877bc6 151/177: Merge pull request #524 from npostavs/fallback-loop, João Távora, 2015/03/28