emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 7612bc1 24/42: Don't check this-command in yas-not-string-


From: Noam Postavsky
Subject: [elpa] master 7612bc1 24/42: Don't check this-command in yas-not-string-or-comment-condition
Date: Sun, 22 Dec 2019 17:38:00 -0500 (EST)

branch: master
commit 7612bc1b706f3e94a0c6611f4d5ec4fcb66c3da6
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Don't check this-command in yas-not-string-or-comment-condition
    
    Since we now check conditions in conditional keybindings, it can be
    evaluated before 'this-command' has been assigned.
    * yasnippet.el (yas-not-string-or-comment-condition): Remove check of
    'this-command'.
---
 yasnippet.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/yasnippet.el b/yasnippet.el
index dbb9b4d..cc11e8f 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -481,10 +481,8 @@ Attention: These hooks are not run when exiting 
nested/stacked snippet expansion
   "Hooks to run just before expanding a snippet.")
 
 (defconst yas-not-string-or-comment-condition
-  '(if (and (let ((ppss (syntax-ppss)))
-              (or (nth 3 ppss) (nth 4 ppss)))
-            (memq this-command '(yas-expand yas-expand-from-trigger-key
-                                            yas-expand-from-keymap)))
+  '(if (let ((ppss (syntax-ppss)))
+         (or (nth 3 ppss) (nth 4 ppss)))
        '(require-snippet-condition . force-in-comment)
      t)
   "Disables snippet expansion in strings and comments.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]