From 7365f9ed40c2470799686954c9e981b499eca2de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20T=C3=A9choueyres?= Date: Sat, 22 Jul 2017 22:02:16 +0200 Subject: [PATCH] Avoid to indent snippets having setup `(yas-indent-line 'fixed)' Avoid `yas--auto-fill' call to `yas--update-mirrors' without setting the snippet environment. * yasnippet.el (yas--auto-fill): Reinstate snippet environment before calling `yas--update-mirrors'. --- yasnippet.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yasnippet.el b/yasnippet.el index 834d035..4ad502a 100644 --- a/yasnippet.el +++ b/yasnippet.el @@ -3635,7 +3635,10 @@ field start. This hook does nothing if an undo is in progress." (narrow-to-region beg end) (mapc #'yas--restore-marker-location remarkers) (mapc #'yas--restore-overlay-location reoverlays)) - (mapc #'yas--update-mirrors snippets)))) + (mapc (lambda (snippet) + (yas--letenv (yas--snippet-expand-env snippet) + (yas--update-mirrors snippet))) + snippets)))) ;;; Apropos protection overlays: