[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode 846ed32 063/495: optimizations
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode 846ed32 063/495: optimizations |
Date: |
Sat, 7 Aug 2021 09:04:44 -0400 (EDT) |
branch: elpa/go-mode
commit 846ed32016d8b7d36c8db87a57752efe4a47b320
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>
optimizations
---
go-mode.el | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index bea6c15..af962e5 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -149,11 +149,14 @@ built-ins, functions, and some types.")
(go--backward-irrelevant t)
(looking-back go-dangling-operators-regexp)))
-(defun go-goto-opening-parenthesis ()
- (let ((start-nesting (go-paren-level)))
+(defun go-goto-opening-parenthesis (&optional char)
+ (let ((start-nesting (go-paren-level)) group)
+ (if char
+ (setq group (case char (?\] "^[") (?\} "^{") (?\) "^(")))
+ (setq group "^[{("))
(while (and (not (bobp))
(>= (go-paren-level) start-nesting))
- (if (= 0 (skip-chars-backward "^[{("))
+ (if (= 0 (skip-chars-backward group))
(if (go-in-string-or-comment-p)
(go-goto-beginning-of-string-or-comment)
(backward-char))))))
@@ -168,7 +171,7 @@ built-ins, functions, and some types.")
(setq start-nesting (go-paren-level))
(if (looking-at "[])}]")
(progn
- (go-goto-opening-parenthesis)
+ (go-goto-opening-parenthesis (char-after))
(if (go-previous-line-has-dangling-op-p)
(- (current-indentation) tab-width)
(current-indentation)))
- [nongnu] elpa/go-mode 5a58bda 149/495: bump version, (continued)
- [nongnu] elpa/go-mode 5a58bda 149/495: bump version, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode a55aa42 168/495: add pledgie to the readme, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 115b2eb 171/495: add go-coverage to readme, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b0d4379 175/495: fix for eea3ccf, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 2089798 200/495: ignore backquote in comment or string, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 6b5fe38 204/495: write our own implementation of go--delete-whole-line, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1319be5 210/495: simplify godoc-at-point, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 61aafe9 218/495: Allow spaces after "chan<-", ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 078d5d8 229/495: Use utf-8 when calling godef, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d900f72 060/495: extend indentation_tests/gh-15.go, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 846ed32 063/495: optimizations,
ELPA Syncer <=
- [nongnu] elpa/go-mode e184d60 070/495: Replace go--directory-dirs with find-lisp-find-files-internal, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 56ab2c8 088/495: make sure kill-line in go-remove-unused-imports includes \n, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 0b32caa 093/495: fix usage of url-* functions, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1fdbcbf 095/495: use line-number-at-pos isntead of count-lines, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7512759 104/495: Merge branch 'master' of https://github.com/imarko/go-mode.el into imarko-master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode a52724b 116/495: use own history for godoc command, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode fb3e413 118/495: fix list markup in readme, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 0f0fe35 127/495: actually avoid using process-lines, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 5c3a797 129/495: Handle indentation for multi-line function declarations correctly, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f5c445c 130/495: improve godef related documentation, ELPA Syncer, 2021/08/07