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

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

[nongnu] elpa/evil-matchit 575e1e652a 037/244: support go-mode v1.2.6


From: ELPA Syncer
Subject: [nongnu] elpa/evil-matchit 575e1e652a 037/244: support go-mode v1.2.6
Date: Thu, 6 Jan 2022 02:58:47 -0500 (EST)

branch: elpa/evil-matchit
commit 575e1e652a007ed531574a4ad331f2cffc0bf997
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>

    support go-mode v1.2.6
    
    - go language
    - handle corner case like "if(...) { /* comment*/"
---
 README.org             | 2 +-
 evil-matchit-pkg.el    | 2 +-
 evil-matchit-simple.el | 5 ++++-
 evil-matchit.el        | 4 ++--
 pkg.sh                 | 2 +-
 5 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/README.org b/README.org
index 405f9bdca1..8429334c76 100644
--- a/README.org
+++ b/README.org
@@ -1,4 +1,4 @@
-* evil-matchit (version 1.2.5)
+* evil-matchit (version 1.2.6)
 
 Vim [[http://www.vim.org/scripts/script.php?script_id=39][matchit.vim]] by 
Benji Fisher ported into Emacs.
 
diff --git a/evil-matchit-pkg.el b/evil-matchit-pkg.el
index 84ca13932d..8eccf25763 100644
--- a/evil-matchit-pkg.el
+++ b/evil-matchit-pkg.el
@@ -1,2 +1,2 @@
-(define-package "evil-matchit" "1.2.5"
+(define-package "evil-matchit" "1.2.6"
                 "Vim matchit ported into Emacs (requires EVIL)")
diff --git a/evil-matchit-simple.el b/evil-matchit-simple.el
index 1845873ccf..87780ebc9e 100644
--- a/evil-matchit-simple.el
+++ b/evil-matchit-simple.el
@@ -30,7 +30,10 @@
 
 (defun evilmi--simple-find-open-brace (cur-line)
   (let (rlt)
-    (if (string-match "^[ \t]*\(?[a-zA-Z0-9]+.*{ *$" cur-line)
+    ;; javascript code line "(function(...) { ..."
+    ;; C code line "} else {"
+    (if (or (string-match "^[ \t]*[\(\}]?[a-zA-Z0-9]+.*{ *\\(\/\/.*\\)?$" 
cur-line)
+            (string-match "^[ \t]*[\(\}]?[a-zA-Z0-9]+.*{ 
*\\(\/\*[^/]*\*\/\\)?$" cur-line))
         (setq rlt 1)
       (save-excursion
         (forward-line)
diff --git a/evil-matchit.el b/evil-matchit.el
index 94c499793a..f1a9ece346 100644
--- a/evil-matchit.el
+++ b/evil-matchit.el
@@ -4,7 +4,7 @@
 
 ;; Author: Chen Bin <chenbin.sh@gmail.com>
 ;; URL: http://github.com/redguardtoo/evil-matchit
-;; Version: 1.2.5
+;; Version: 1.2.6
 ;; Keywords: matchit vim evil
 ;; Package-Requires: ((evil "1.0.7"))
 ;;
@@ -91,7 +91,7 @@
   (mapc (lambda (mode)
           (plist-put evilmi-plugins mode '((evilmi-simple-get-tag 
evilmi-simple-jump)))
           )
-        '(java-mode js-mode js2-mode javascript-mode perl-mode cperl-mode))
+        '(java-mode js-mode js2-mode javascript-mode perl-mode cperl-mode 
go-mode))
 
   ;; Html
   (autoload 'evilmi-html-get-tag "evil-matchit-html" nil)
diff --git a/pkg.sh b/pkg.sh
index 87811ded4d..12fa2bdcac 100755
--- a/pkg.sh
+++ b/pkg.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-pkg=evil-matchit-1.2.5
+pkg=evil-matchit-1.2.6
 mkdir $pkg
 cp README.org $pkg
 cp *.el $pkg



reply via email to

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