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

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

[nongnu] elpa/go-mode 572c754 042/495: For continuation lines, do not as


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 572c754 042/495: For continuation lines, do not assume the indentation of a multiline raw string
Date: Sat, 7 Aug 2021 09:04:40 -0400 (EDT)

branch: elpa/go-mode
commit 572c75467ef82a6f88739628b0732e23a16ab646
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    For continuation lines, do not assume the indentation of a multiline raw 
string
    
    Closes gh-9
---
 go-mode.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/go-mode.el b/go-mode.el
index b565edb..d22febf 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -185,7 +185,11 @@ built-ins, functions, and some types.")
                           (> (point) line-begin)
                           (>= (go-paren-level) start-nesting))
                     (if (= 0 (skip-chars-backward "^[]{}()" line-begin))
-                        (backward-char)))
+                        (backward-char))
+                    (if (go-in-string-p)
+                        (progn
+                          (go--backward-irrelevant)
+                          (setq line-begin (line-beginning-position)))))
                   (if (and (< (go-paren-level) start-nesting))
                       (+ (current-indentation) tab-width (- outindent))
                     (- (current-indentation) outindent)))))))))))



reply via email to

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