emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/go-mode 68588e1 196/495: Support ff-find-other-file


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 68588e1 196/495: Support ff-find-other-file
Date: Sat, 7 Aug 2021 09:05:12 -0400 (EDT)

branch: elpa/go-mode
commit 68588e1fac3797ef7a0f47e7696749aba8ac6051
Author: Yasuyuki Oka <yasuyk@gmail.com>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    Support ff-find-other-file
---
 go-mode.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/go-mode.el b/go-mode.el
index 2805346..a1b6057 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -16,6 +16,7 @@
 (require 'cl)
 (require 'etags)
 (require 'ffap)
+(require 'find-file)
 (require 'ring)
 (require 'url)
 
@@ -177,6 +178,13 @@ from https://github.com/bradfitz/goimports.";
   :type 'string
   :group 'go)
 
+(defcustom go-other-file-alist
+  '(("_test\\.go\\'" (".go"))
+    ("\\.go\\'" ("_test.go")))
+  "See the documentation of `ff-other-file-alist' for details."
+  :type '(repeat (list regexp (choice (repeat string) function)))
+  :group 'go)
+
 (defface go-coverage-untracked
   '((t (:foreground "#505050")))
   "Coverage color of untracked code."
@@ -570,6 +578,8 @@ recommended that you look at goflymake
   (set (make-local-variable 'go-dangling-cache) (make-hash-table :test 'eql))
   (add-hook 'before-change-functions (lambda (x y) (setq go-dangling-cache 
(make-hash-table :test 'eql))) t t)
 
+  ;; ff-find-other-file
+  (setq ff-other-file-alist 'go-other-file-alist)
 
   (setq imenu-generic-expression
         '(("type" "^type *\\([^ \t\n\r\f]*\\)" 1)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]