[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode 46448ea 258/495: Collect all the define-key statem
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode 46448ea 258/495: Collect all the define-key statements at the bottom |
Date: |
Sat, 7 Aug 2021 09:05:27 -0400 (EDT) |
branch: elpa/go-mode
commit 46448eaadba92805350b553329967ae6b44f7c84
Author: Lowe Thiderman <lowe.thiderman@gmail.com>
Commit: Lowe Thiderman <lowe.thiderman@gmail.com>
Collect all the define-key statements at the bottom
---
go-mode.el | 26 ++++++++++----------------
1 file changed, 10 insertions(+), 16 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index 4ae3c40..bbf6ef1 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -1568,9 +1568,6 @@ for."
(if (not (eq cur-buffer (current-buffer)))
(display-buffer (current-buffer)
`(,go-coverage-display-buffer-func))))))
-(define-prefix-command 'go-goto-map)
-(define-key go-mode-map (kbd "C-c C-g") 'go-goto-map)
-
(defun go-goto-function ()
"Go to the function defintion above point.
@@ -1614,8 +1611,6 @@ If the function is anonymous, place point on the 'func'
keyword."
(when (looking-at "Test")
(forward-char 4)))))
-(define-key go-goto-map (kbd "f") 'go-goto-function-name)
-
(defun go-goto-arguments ()
"Go to the return value declaration of the current function."
(interactive)
@@ -1623,8 +1618,6 @@ If the function is anonymous, place point on the 'func'
keyword."
(forward-word 1)
(forward-char 1))
-(define-key go-goto-map (kbd "a") 'go-goto-arguments)
-
(defun go-goto-return-value ()
"Go to the return value declaration of the current function.
@@ -1645,11 +1638,6 @@ If there is none, make space for one to be added."
(insert " ")
(backward-char 1)))
-(define-key go-goto-map (kbd "r") 'go-goto-return-value)
-
-;; Since this is already defined, just add the key to it.
-(define-key go-goto-map (kbd "i") 'go-goto-imports)
-
(defun go-goto-type-signature ()
"Go to the type signature of the current function.
@@ -1662,8 +1650,6 @@ If there is none, add parenthesis to add one."
(insert "() ")))
(forward-char 1))
-(define-key go-goto-map (kbd "t") 'go-goto-type-signature)
-
(defun go-goto-docstring ()
"Go to the top of the docstring of the current function.
@@ -1683,14 +1669,22 @@ If there is none, add one."
(newline)
(insert (format "// %s " (go--get-function-name)))))
-(define-key go-goto-map (kbd "d") 'go-goto-docstring)
-
(defun go--get-function-name ()
"Return the current function name as a string"
(save-excursion
(go-goto-function-name)
(symbol-name (symbol-at-point))))
+(define-prefix-command 'go-goto-map)
+(define-key go-mode-map (kbd "C-c C-g") 'go-goto-map)
+
+(define-key go-goto-map (kbd "a") 'go-goto-arguments)
+(define-key go-goto-map (kbd "d") 'go-goto-docstring)
+(define-key go-goto-map (kbd "f") 'go-goto-function-name)
+(define-key go-goto-map (kbd "i") 'go-goto-imports)
+(define-key go-goto-map (kbd "r") 'go-goto-return-value)
+(define-key go-goto-map (kbd "t") 'go-goto-type-signature)
+
(provide 'go-mode)
;;; go-mode.el ends here
- [nongnu] elpa/go-mode 50e7182 234/495: fix several `checkdoc' errors., (continued)
- [nongnu] elpa/go-mode 50e7182 234/495: fix several `checkdoc' errors., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d38444d 236/495: add RĂ¼diger Sonderfeld to AUTHORS file, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 59d1e82 231/495: include link to ELPA guide in readme, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d1a8f67 237/495: bump version to 1.1.0, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode aa032d9 248/495: Add Taiki Sugawara to AUTHORS, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 64be4a3 249/495: Merge branch 'godoc_mode', ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 5d53a13 252/495: Update import path of godef, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 15d227a 253/495: gofmt: wrap external commands in `unwind-protect', ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 91c4496 254/495: go-unused-imports-lines escape dot in regexp correctly, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 0b1ec30 255/495: go-unused-imports-lines pass -e to compiler to get all errors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 46448ea 258/495: Collect all the define-key statements at the bottom,
ELPA Syncer <=
- [nongnu] elpa/go-mode 8965fa1 261/495: Use forward-list instead of re-search-forward in go-goto-return-value, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 10f7d10 260/495: go-goto-return-value: don't move past pointer, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b78582a 262/495: Rename go-goto-type-signature to go-goto-method-receiver, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode a16e2e0 266/495: Update docstring and comments for go--in-function-p, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 94ffc7a 270/495: go-goto-docstring: insert function name even if empty comment, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 093a492 274/495: Rename go--in-function-p to go--below-anonymous-function, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 2f302d2 279/495: Update go--goto-opening-curly-brace to handle more cases, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 29f3380 280/495: Remove trailing whitespace in go-mode.el, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode dd46d4f 281/495: Modify go--goto-opening-curly-brace to use end-of-defun, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 6fc1f35 282/495: Move go-goto keymap to the rest of the keymap, ELPA Syncer, 2021/08/07