[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master c3a9447 43/63: Fix condition timestamps in key filter func
From: |
Noam Postavsky |
Subject: |
[elpa] master c3a9447 43/63: Fix condition timestamps in key filter functions |
Date: |
Mon, 17 Jul 2017 22:54:17 -0400 (EDT) |
branch: master
commit c3a94478b461d99c0c99493a20ec5bd902254062
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Fix condition timestamps in key filter functions
* yasnippet.el (yas--maybe-expand-key-filter):
(yas--maybe-expand-from-keymap-filter): Let-bind
`yas--condition-cache-timestamp' to the current time.
---
yasnippet.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/yasnippet.el b/yasnippet.el
index b4b4df5..b618f73 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -580,7 +580,9 @@ conditions.
"Holds the YASnippet menu.")
(defun yas--maybe-expand-key-filter (cmd)
- (if (yas--templates-for-key-at-point) cmd))
+ (when (let ((yas--condition-cache-timestamp (current-time)))
+ (yas--templates-for-key-at-point))
+ cmd))
(defconst yas-maybe-expand
'(menu-item "" yas-expand :filter yas--maybe-expand-key-filter)
@@ -2230,7 +2232,8 @@ object satisfying `yas--field-p' to restrict the
expansion to."
(yas--fallback))))
(defun yas--maybe-expand-from-keymap-filter (cmd)
- (let* ((vec (cl-subseq (this-command-keys-vector)
+ (let* ((yas--condition-cache-timestamp (current-time))
+ (vec (cl-subseq (this-command-keys-vector)
(if current-prefix-arg
(length (this-command-keys))
0)))
- [elpa] master 462f566 44/63: Don't leave unreadable objects in the undo list, (continued)
- [elpa] master 462f566 44/63: Don't leave unreadable objects in the undo list, Noam Postavsky, 2017/07/17
- [elpa] master 3949421 41/63: Fix problems with auto-fill-mode interaction, Noam Postavsky, 2017/07/17
- [elpa] master 0d9afb2 31/63: Fix mirror transformation error with expand-env, Noam Postavsky, 2017/07/17
- [elpa] master b4d2f9c 37/63: Update snippets submodule, Noam Postavsky, 2017/07/17
- [elpa] master c5fddf8 34/63: Restore syntax-propertize-function before indenting snippet, Noam Postavsky, 2017/07/17
- [elpa] master 5043a96 38/63: Correctly wrap auto-fill-function when it's toggled on later, Noam Postavsky, 2017/07/17
- [elpa] master 30913fd 35/63: Only update live snippets, Noam Postavsky, 2017/07/17
- [elpa] master 0f6d82f 46/63: * .travis.yml: Use Emacs 25.2, Noam Postavsky, 2017/07/17
- [elpa] master 6102ff5 50/63: Handle undo of snippet 1st line indent properly, Noam Postavsky, 2017/07/17
- [elpa] master ac26024 20/63: Rework error handling, Noam Postavsky, 2017/07/17
- [elpa] master c3a9447 43/63: Fix condition timestamps in key filter functions,
Noam Postavsky <=
- [elpa] master 82818e5 48/63: Don't delete snippets more than once., Noam Postavsky, 2017/07/17
- [elpa] master 63f44b4 33/63: Ensure inhibit-modification-hooks is nil while modifying buffer, Noam Postavsky, 2017/07/17
- [elpa] master 0041efe 17/63: Make snippets work in org source blocks, Noam Postavsky, 2017/07/17
- [elpa] master 47f37f7 42/63: Fix ${0:soon-to-be-deleted} with no other fields, Noam Postavsky, 2017/07/17
- [elpa] master e8ed276 52/63: Make sure tests don't rely on running order, Noam Postavsky, 2017/07/17
- [elpa] master 2a3a0cd 61/63: Update CONTRIBUTING.md information, Noam Postavsky, 2017/07/17
- [elpa] master b0e729b 58/63: Optionally add undo list to debug info, Noam Postavsky, 2017/07/17
- [elpa] master 274406e 55/63: Provide command line interface from yasnippet-debug.el, Noam Postavsky, 2017/07/17
- [elpa] master 6e9b7f9 30/63: Fix running hook variable set as buffer-local, Noam Postavsky, 2017/07/17
- [elpa] master 7f337f4 32/63: Fix nested snippet expansion, Noam Postavsky, 2017/07/17