[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode d964767 399/495: Use forward-word-strictly when av
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode d964767 399/495: Use forward-word-strictly when available |
Date: |
Sat, 7 Aug 2021 09:05:56 -0400 (EDT) |
branch: elpa/go-mode
commit d9647672717bb5d507de42975a337c738a0461a3
Author: nverno <noah.v.peart@gmail.com>
Commit: Dominik Honnef <dominik@honnef.co>
Use forward-word-strictly when available
Closes: gh-167 [via git-merge-pr]
---
go-mode.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index 8f45651..d86d6c2 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -22,6 +22,12 @@
(require 'url)
+(eval-when-compile
+ (defmacro go--forward-word (&optional arg)
+ (if (fboundp 'forward-word-strictly)
+ `(forward-word-strictly ,arg)
+ `(forward-word ,arg))))
+
(defun go--delete-whole-line (&optional arg)
"Delete the current line without putting it in the `kill-ring'.
Derived from function `kill-whole-line'. ARG is defined as for that
@@ -1675,7 +1681,7 @@ If ARG is non-nil, anonymous functions are ignored."
;; should search forward instead.
(when (not (looking-at "\\<func\\>"))
(re-search-forward "\\<func\\>" nil t)
- (forward-word -1))
+ (go--forward-word -1))
;; If we have landed at an anonymous function, it is possible that we
;; were not inside it but below it. If we were not inside it, we should
@@ -1741,7 +1747,7 @@ If ARG is non-nil, anonymous functions are skipped."
(when (looking-at "\\<func (")
(setq words 3
chars 2))
- (forward-word words)
+ (go--forward-word words)
(forward-char chars)
(when (looking-at "Test")
(forward-char 4)))))
@@ -1752,7 +1758,7 @@ If ARG is non-nil, anonymous functions are skipped."
If ARG is non-nil, anonymous functions are skipped."
(interactive "P")
(go-goto-function-name arg)
- (forward-word 1)
+ (go--forward-word 1)
(forward-char 1))
(defun go--goto-return-values (&optional arg)
- [nongnu] elpa/go-mode 004575e 330/495: Don't leave godef buffer around, (continued)
- [nongnu] elpa/go-mode 004575e 330/495: Don't leave godef buffer around, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 409cc64 344/495: cmd/oracle: usability improvements to "describe", "referrers", ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d9d47fa 332/495: go.tools/oracle: change -ptalog default to ""., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode bd236e5 367/495: cmd/guru: emacs: update default-directory, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 2db2ff6 333/495: go.tools/oracle: change -pos flag syntax from "file pos-pos" to file:pos-pos., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 17a7d8a 370/495: cmd/guru: emacs: add function for expandiong region, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode dbc9124 378/495: Move go-guru.el to top level, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b949a9b 363/495: cmd/guru: emacs: add go-guru-debug variable, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 04a2946 380/495: Merge branch 'import-guru', ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 259110b 396/495: Use a named function for before-change-functions., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d964767 399/495: Use forward-word-strictly when available,
ELPA Syncer <=
- [nongnu] elpa/go-mode 7c38d6a 477/495: Improve commenting partial lines., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 24990df 400/495: Some simple style fixes for issues found by checkdoc, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 10d6ab4 486/495: Allow leading spaces for compilation error message, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode e79970d 224/495: fix beginning-of-defun for abs(count) > 1, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode cec546c 306/495: Clarify some points in NEWS, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 5c1c546 307/495: Don't fontify parenthesis of multi-line type declaration, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 99b06da 408/495: Describe gofmt-args in the readme and the gofmt docstring (also gofmt-command), ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7c50c80 410/495: Always move back to same column after applying rcs patch, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode e20a54a 426/495: Speed up go-previous-line-has-dangling-op-p, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1650ae5 434/495: Fix multiline case statement indent., ELPA Syncer, 2021/08/07