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

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

[elpa] master 5534cab 07/63: Respect yas-indent-line for mirror updates


From: Noam Postavsky
Subject: [elpa] master 5534cab 07/63: Respect yas-indent-line for mirror updates
Date: Mon, 17 Jul 2017 22:54:11 -0400 (EDT)

branch: master
commit 5534cab0b70cc5c88fcfb8a4a90cc5a18464db2e
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Respect yas-indent-line for mirror updates
    
    * yasnippet.el (yas--mirror-update-display): Check yas-indent-line
    before indenting.
---
 yasnippet.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/yasnippet.el b/yasnippet.el
index 5fa5687..5339206 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -4303,10 +4303,11 @@ When multiple expressions are found, only the last one 
counts."
         (yas--advance-start-maybe (yas--mirror-next mirror) (point))
         ;; super-special advance
         (yas--advance-end-of-parents-maybe mirror-parent-field (point)))
-      (let ((yas--inhibit-overlay-hooks t))
-        (yas--indent-region (yas--mirror-start mirror)
-                            (yas--mirror-end mirror)
-                            snippet)))))
+      (when (eq yas-indent-line 'auto)
+        (let ((yas--inhibit-overlay-hooks t))
+          (yas--indent-region (yas--mirror-start mirror)
+                              (yas--mirror-end mirror)
+                              snippet))))))
 
 (defun yas--field-update-display (field)
   "Much like `yas--mirror-update-display', but for fields."



reply via email to

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