branch: master
commit 15761e85d63f5ce52a4f163dba93a0561a67b778
Author: Noam Postavsky <npost...@users.sourceforge.net>
Commit: Noam Postavsky <npost...@users.sourceforge.net>

    Adjust previous fix
    
    * yasnippet.el (yas--indent): Call `beginning-of-line' before doing
    fixed indentation.
---
 yasnippet.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/yasnippet.el b/yasnippet.el
index 1f92adc..5f17465 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -4306,6 +4306,9 @@ The SNIPPET's markers are preserved."
            (forward-line 1)
            (let ((indent-line-function
                   (lambda ()
+                    ;; We need to be at beginning of line in order to
+                    ;; indent existing whitespace correctly.
+                    (beginning-of-line)
                     (indent-to-column yas--indent-original-column))))
              (yas--indent-region (line-beginning-position)
                                  (point-max)

Reply via email to