From 73565f104162ad34fa8d6ee6f941d83d0e09ba63 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 1 Sep 2020 19:35:54 -0400 Subject: [PATCH] Only expand emmet snippets if at word boundary Makes emmet a little less aggressive on TAB. Addresses #3383 --- modules/lang/web/autoload/html.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/lang/web/autoload/html.el b/modules/lang/web/autoload/html.el index bfb1de838..7956eff09 100644 --- a/modules/lang/web/autoload/html.el +++ b/modules/lang/web/autoload/html.el @@ -122,7 +122,9 @@ snippet, or `emmet-expand-yas'/`emmet-expand-line', depending on whether `yas-minor-mode' is enabled or not." (interactive) (call-interactively - (cond ((<= (current-column) (current-indentation)) + (cond ((or (<= (current-column) (current-indentation)) + (not (eolp)) + (not (memq (char-after) (list ?\n ?\s ?\t)))) #'indent-for-tab-command) ((bound-and-true-p yas-minor-mode) (if (yas--templates-for-key-at-point)