[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master fb253ac 15/42: New public function yas-maybe-expand-abbrev
From: |
Noam Postavsky |
Subject: |
[elpa] master fb253ac 15/42: New public function yas-maybe-expand-abbrev-key-filter |
Date: |
Sun, 22 Dec 2019 17:37:58 -0500 (EST) |
branch: master
commit fb253ac60713c830657e9c1634e038b38ed4d9d6
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
New public function yas-maybe-expand-abbrev-key-filter
* yasnippet.el (yas-maybe-expand-abbrev-key-filter): Renamed from
yas--maybe-expand-key-filter.
---
yasnippet.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/yasnippet.el b/yasnippet.el
index 38b1a93..a04372a 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -623,13 +623,19 @@ override bindings from other packages (e.g.,
`company-mode')."
(defvar yas--condition-cache-timestamp nil)
-(defun yas--maybe-expand-key-filter (cmd)
+(defun yas-maybe-expand-abbrev-key-filter (cmd)
+ "Return CMD if there is an expandable snippet at point.
+This function is useful as a `:filter' to a conditional key
+definition."
(when (let ((yas--condition-cache-timestamp (current-time)))
(yas--templates-for-key-at-point))
cmd))
+(define-obsolete-function-alias 'yas--maybe-expand-key-filter
+ #'yas-maybe-expand-abbrev-key-filter "0.14")
+
(defconst yas-maybe-expand
- '(menu-item "" yas-expand :filter yas--maybe-expand-key-filter)
+ '(menu-item "" yas-expand :filter yas-maybe-expand-abbrev-key-filter)
"A conditional key definition.
This can be used as a key definition in keymaps to bind a key to
`yas-expand' only when there is a snippet available to be
- [elpa] master 4af3354 02/42: Make less garbage in overlay heavy buffers, (continued)
- [elpa] master 4af3354 02/42: Make less garbage in overlay heavy buffers, Noam Postavsky, 2019/12/22
- [elpa] master e67592c 03/42: Don't use overlays to find active snippets, Noam Postavsky, 2019/12/22
- [elpa] master 79b90c9 04/42: Remove compatibility code for Emacs 22 and earlier, Noam Postavsky, 2019/12/22
- [elpa] master d3bb879 05/42: Remove last-buffer-undo-list compat definition, Noam Postavsky, 2019/12/22
- [elpa] master 4f78d03 01/42: Close #937: Officially support automatically moving to next field, Noam Postavsky, 2019/12/22
- [elpa] master 1e71360 06/42: Per #947: fix typo in README.md, Noam Postavsky, 2019/12/22
- [elpa] master 7a178a2 07/42: Remove spurious change of before-change-functions, Noam Postavsky, 2019/12/22
- [elpa] master 8328c38 08/42: Fix another failure of cc-mode indentation, Noam Postavsky, 2019/12/22
- [elpa] master eeb05f0 10/42: Handle field adjust of pending active fields, Noam Postavsky, 2019/12/22
- [elpa] master 8452227 13/42: Consider fundamental-mode as ultimate ancestor, Noam Postavsky, 2019/12/22
- [elpa] master fb253ac 15/42: New public function yas-maybe-expand-abbrev-key-filter,
Noam Postavsky <=
- [elpa] master bceb65b 16/42: Make backspace/DEL clear field (#957), Noam Postavsky, 2019/12/22
- [elpa] master 3c0be40 11/42: Update FAQ, Noam Postavsky, 2019/12/22
- [elpa] master 8b25d62 20/42: * doc/snippet-development.org: Fix typos., Noam Postavsky, 2019/12/22
- [elpa] master 7612bc1 24/42: Don't check this-command in yas-not-string-or-comment-condition, Noam Postavsky, 2019/12/22
- [elpa] master dabc719 21/42: Don't turn on yas-minor-mode in temp buffers, Noam Postavsky, 2019/12/22
- [elpa] master fc33b2f 28/42: Make overlay-modification protection optional, Noam Postavsky, 2019/12/22
- [elpa] master 048d030 22/42: Fix line-relative snapshotting for org src blocks, Noam Postavsky, 2019/12/22
- [elpa] master bae20af 27/42: ; * doc/faq.org: Linkify bug reference., Noam Postavsky, 2019/12/22
- [elpa] master ffc733d 09/42: ; Debug code fixes, Noam Postavsky, 2019/12/22
- [elpa] master 1d96da2 18/42: Don't call before/after change-functions twice, Noam Postavsky, 2019/12/22