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

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

[elpa] master 15761e8 41/51: Adjust previous fix


From: Noam Postavsky
Subject: [elpa] master 15761e8 41/51: Adjust previous fix
Date: Sun, 13 May 2018 13:11:46 -0400 (EDT)

branch: master
commit 15761e85d63f5ce52a4f163dba93a0561a67b778
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    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

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