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

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

[nongnu] elpa/go-mode 27f6fb0 047/495: improve indentation routine by ju


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 27f6fb0 047/495: improve indentation routine by jumping around less
Date: Sat, 7 Aug 2021 09:04:41 -0400 (EDT)

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

    improve indentation routine by jumping around less
---
 go-mode.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index 6dafcc0..88573c1 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -206,11 +206,9 @@ built-ins, functions, and some types.")
         nil
       (if (looking-at "case .+:\\|default:")
           (setq indent (- indent tab-width)))
-      (beginning-of-line)
-      (if (and (looking-at "^[[:space:]]*[[:word:]]+:\\([[:space:]]*/.+\\)?$")
-               (not (looking-at "^[[:space:]]*default:")))
+      (if (and (looking-at "[[:word:]]+:\\([[:space:]]*/.+\\)?$")
+               (not (looking-at "default:")))
           (setq indent 0))
-      (skip-chars-forward " \t")
       (setq shift-amt (- indent (current-column)))
       (if (zerop shift-amt)
           nil



reply via email to

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