[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode 4c13588 147/495: replace go-goto-opening-parenthes
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode 4c13588 147/495: replace go-goto-opening-parenthesis implementation with backward-up-list |
Date: |
Sat, 7 Aug 2021 09:05:01 -0400 (EDT) |
branch: elpa/go-mode
commit 4c13588cabe91fc05a98cda8d6be7df840590faf
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>
replace go-goto-opening-parenthesis implementation with backward-up-list
---
go-mode.el | 16 +++-------------
indentation_tests/gh-15.go | 2 +-
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index 00300e4..977b6b4 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -81,6 +81,8 @@
(concat "\\<" s "\\>")
(concat "\\_<" s "\\_>")))
+(defalias 'go-goto-opening-parenthesis 'backward-up-list)
+
(defconst go-dangling-operators-regexp "[^-]-\\|[^+]\\+\\|[/*&><.=|^]")
(defconst go-identifier-regexp "[[:word:][:multibyte:]]+")
(defconst go-label-regexp go-identifier-regexp)
@@ -287,18 +289,6 @@ curly brace we are checking. If they match, we return
non-nil."
(if (and (= (go-paren-level) start-nesting) (= old-point (point)))
t))))))
-(defun go-goto-opening-parenthesis (&optional char)
- (let ((start-nesting (go-paren-level)))
- (while (and (not (bobp))
- (>= (go-paren-level) start-nesting))
- (if (zerop (skip-chars-backward
- (if char
- (case char (?\] "^[") (?\} "^{") (?\) "^("))
- "^[{(")))
- (if (go-in-string-or-comment-p)
- (go-goto-beginning-of-string-or-comment)
- (backward-char))))))
-
(defun go--indentation-for-opening-parenthesis ()
"Return the semantic indentation for the current opening parenthesis.
@@ -323,7 +313,7 @@ current line will be returned."
((go-in-string-p)
(current-indentation))
((looking-at "[])}]")
- (go-goto-opening-parenthesis (char-after))
+ (go-goto-opening-parenthesis)
(if (go-previous-line-has-dangling-op-p)
(- (current-indentation) tab-width)
(go--indentation-for-opening-parenthesis)))
diff --git a/indentation_tests/gh-15.go b/indentation_tests/gh-15.go
index 4e8a9a4..5489529 100644
--- a/indentation_tests/gh-15.go
+++ b/indentation_tests/gh-15.go
@@ -1,7 +1,7 @@
package gh15
func somewhatLongFunctionName(
- arg1 package1.RatherLongTypeName, arg2 package2.AnotherLongTypeName) {
+ arg1 package1.RatherLongTypeName, arg3 struct{}) {
return
}
- [nongnu] elpa/go-mode 60dec2c 126/495: add godef documentation, (continued)
- [nongnu] elpa/go-mode 60dec2c 126/495: add godef documentation, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode dc68bd2 124/495: add a lot of compatibility for xemacs, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b880a36 139/495: derive go-mode from prog-mode if possible, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7411757 141/495: readme: move godef install instructions up to first mentioning of godef, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 41f8759 135/495: document line-offset in go--apply-rcs-patch, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 895b285 138/495: add customizable variable for mode hook, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode bf0bd30 144/495: Change the way we use prog-mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 2ec688b 143/495: kill gofmt errbuf if the buffer was already formatted, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 98e66f7 142/495: add docstring to go--apply-rcs-patch, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode fd03739 151/495: push mark to find-tag-marker-ring, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 4c13588 147/495: replace go-goto-opening-parenthesis implementation with backward-up-list,
ELPA Syncer <=
- [nongnu] elpa/go-mode dc6bd34 154/495: swallow error in go-goto-opening-parenthesis, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode c2b4441 155/495: Require ring so that we don't rely on a transitive require, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 8a1c5df 159/495: minor style changes from CL, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 96eb71e 153/495: fix godef-jump on Windows, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 4e92adb 150/495: add godef-jump-other-window, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 2f67998 160/495: don't change point in go--line-column-to-point, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f79120b 166/495: add support for mode=count coverage, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1d5ddda 167/495: add coverage count as a tooltip, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode eaa47c2 165/495: remove old overlays, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 210bb30 174/495: go-coverage: only update max-count if it's a count for the file we're interested in, ELPA Syncer, 2021/08/07