[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode 23310e5 090/495: be more lenient when finding comm
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode 23310e5 090/495: be more lenient when finding commented imports |
Date: |
Sat, 7 Aug 2021 09:04:49 -0400 (EDT) |
branch: elpa/go-mode
commit 23310e5177b98e53b76e55ab7d709e5b58dced60
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>
be more lenient when finding commented imports
---
go-mode.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index 974237b..8bc7316 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -615,7 +615,7 @@ uncommented, otherwise a new import will be added."
(setq line (format "\"%s\"" import)))
(goto-char (point-min))
- (if (re-search-forward (concat "^// import " line "$") nil t)
+ (if (re-search-forward (concat "^[[:space:]]*//[[:space:]]*import " line
"$") nil t)
(uncomment-region (line-beginning-position) (line-end-position))
(case (go-goto-imports)
('fail (message "Could not find a place to add import."))
@@ -623,7 +623,7 @@ uncommented, otherwise a new import will be added."
(save-excursion
(re-search-backward "^import (")
(setq import-start (point)))
- (if (re-search-backward (concat "^[[:space:]]+// " line "$")
import-start t)
+ (if (re-search-backward (concat "^[[:space:]]*//[[:space:]]*" line
"$") import-start t)
(uncomment-region (line-beginning-position)
(line-end-position))
(insert "\n\t" line)))
('single (insert "import " line "\n"))
- [nongnu] elpa/go-mode c693232 137/495: mention flymake-go as an alternative to goflymake, (continued)
- [nongnu] elpa/go-mode c693232 137/495: mention flymake-go as an alternative to goflymake, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode ba95288 071/495: load diff-mode on package load, not when running gofmt, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode bfbbb7e 072/495: remove debug output, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode e0de87c 075/495: do not indent labels in column 0 but in normal indentation minus one, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 8216ff9 076/495: some nicer lisp, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7d47e3c 079/495: remove old go-propertize-syntax code, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 58640c3 080/495: Do not consider \ an escape character when in raw strings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 0c25389 081/495: do not set syntax-propertize-function for emacsen that don't know it (GNU Emacs <24 for one), ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 0ecc391 086/495: document issue with go build -o /dev/null, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d7c48cb 089/495: give in and require cl at runtime, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 23310e5 090/495: be more lenient when finding commented imports,
ELPA Syncer <=
- [nongnu] elpa/go-mode 2d500b3 091/495: builtins and keywords need to be surrounded by symbols, not word characters, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 71c7f59 101/495: use correct regexps for labels, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 3139c0f 107/495: fix regexp-opt usage for emacs <24, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 8fb900e 062/495: refactor, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 183c028 068/495: use (car (last)) instead of (car (reverse)), ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 0f71cee 083/495: add autoload cookie to gofmt-before-save, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f0059f6 098/495: in go-packages, skip over directories that do not contain a /pkg subdirectory, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 3d3ba73 103/495: Use completing-read in godoc--read-query, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 67bb849 108/495: use \\_< instead of \\< and do so in a way that won't break XEmacs, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 4637dd6 110/495: Mention gofmt rewrite in README, ELPA Syncer, 2021/08/07