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

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

[nongnu] elpa/go-mode ee10287 059/495: Revert "Fix indentation for code


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode ee10287 059/495: Revert "Fix indentation for code after multi-line function signature"
Date: Sat, 7 Aug 2021 09:04:43 -0400 (EDT)

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

    Revert "Fix indentation for code after multi-line function signature"
    
    It broke more than it helped
    
    This reverts commit a5164ac8bd7b7a2b3b7c11831b9c381768fe6653.
    
    Conflicts:
    
        go-mode.el
---
 go-mode.el | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index 77ce50b..7559966 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -149,12 +149,6 @@ built-ins, functions, and some types.")
     (go--backward-irrelevant t)
     (looking-back go-dangling-operators-regexp)))
 
-(defun go-previous-line-has-opening-parenthesis-p ()
-  (save-excursion
-    (beginning-of-line)
-    (go--backward-irrelevant t)
-    (looking-back "(")))
-
 (defun go-indentation-at-point (point)
   (save-excursion
     (let (start-nesting (outindent 0))
@@ -169,7 +163,7 @@ built-ins, functions, and some types.")
                           (>= (go-paren-level) start-nesting))
                 (skip-chars-backward "^[]{}()")
                 (backward-char))
-              (if (or (go-previous-line-has-dangling-op-p) 
(go-previous-line-has-opening-parenthesis-p))
+              (if (go-previous-line-has-dangling-op-p)
                   (- (current-indentation) tab-width)
                 (current-indentation)))
           (go--backward-irrelevant t)
@@ -188,8 +182,7 @@ built-ins, functions, and some types.")
                 (if (go-in-string-p)
                     (go--backward-irrelevant)))
               (if (< (go-paren-level) start-nesting)
-                  (if (go-previous-line-has-opening-parenthesis-p)
-                      (current-indentation)
+                  (progn
                     (if (go-previous-line-has-dangling-op-p)
                         (setq outindent tab-width))
                     (+ (current-indentation) tab-width (- outindent)))



reply via email to

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