[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-matchit fe4cc5243a: clean code and fixed ci
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-matchit fe4cc5243a: clean code and fixed ci |
Date: |
Wed, 11 Oct 2023 10:01:05 -0400 (EDT) |
branch: elpa/evil-matchit
commit fe4cc5243a23ba7aa283803b200993f23b5dafef
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>
clean code and fixed ci
---
Makefile | 6 +++---
evil-matchit-ruby.el | 2 +-
evil-matchit-sdk.el | 31 +++++++++++++++++--------------
3 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/Makefile b/Makefile
index 6612642a04..458cae1b08 100644
--- a/Makefile
+++ b/Makefile
@@ -24,10 +24,10 @@ clean:
deps:
@mkdir -p deps;
@if [ ! -f deps/evil-1.14.2/evil.el ]; then curl -L
https://stable.melpa.org/packages/evil-1.14.2.tar | tar x -C deps/; fi;
- @if [ ! -f deps/lua-mode.el ]; then curl -L
https://stable.melpa.org/packages/lua-mode-20210802.el > deps/lua-mode.el; fi;
- @if [ ! -f deps/markdown-mode.el ]; then curl -L
https://stable.melpa.org/packages/markdown-mode-2.5.el > deps/markdown-mode.el;
fi;
+ @if [ ! -f deps/lua-mode.el ]; then curl -L
https://raw.githubusercontent.com/immerrr/lua-mode/master/lua-mode.el >
deps/lua-mode.el; fi;
+ @if [ ! -f deps/markdown-mode.el ]; then curl -L
https://raw.githubusercontent.com/jrblevin/markdown-mode/master/markdown-mode.el
> deps/markdown-mode.el; fi;
@if [ ! -f deps/tuareg-3.0.1/tuareg.el ]; then curl -L
https://stable.melpa.org/packages/tuareg-3.0.1.tar | tar x -C deps/; fi;
- @if [ ! -f deps/yaml-mode.el ]; then curl -L
https://stable.melpa.org/packages/yaml-mode-0.0.15.el > deps/yaml-mode.el; fi;
+ @if [ ! -f deps/yaml-mode.el ]; then curl -L
https://raw.githubusercontent.com/yoshiki/yaml-mode/master/yaml-mode.el >
deps/yaml-mode.el; fi;
compile: deps
$(RM) *.elc
diff --git a/evil-matchit-ruby.el b/evil-matchit-ruby.el
index 951fe16170..364d4f4c16 100644
--- a/evil-matchit-ruby.el
+++ b/evil-matchit-ruby.el
@@ -48,7 +48,7 @@
'((("unless" "if") ("elsif" "else") "end")
("begin" ("rescue" "ensure") "end")
("case" ("when" "else") "end")
- (("class" "def" "while" "do" "module" "for" "until") () "end")))
+ (("class" "def" "while" "do" "module" "for" "until") () "end" "ENDLESS")))
;;;###autoload
(defun evilmi-ruby-get-tag ()
diff --git a/evil-matchit-sdk.el b/evil-matchit-sdk.el
index c39203d9e9..443b7b16f9 100644
--- a/evil-matchit-sdk.el
+++ b/evil-matchit-sdk.el
@@ -282,22 +282,25 @@ If IS-FORWARD is t, jump forward; or else jump backward."
(cur-row-idx (nth 0 cur-tag-info))
(orig-type (nth 1 orig-tag-info))
(cur-type (nth 1 cur-tag-info)))
+
;; handle function exit point
(when (= 1 level)
- ;; end tag could be the same
- (if (and (evilmi-sdk-strictly-type-p cur-tag-info orig-tag-info)
- (not (evilmi-sdk-exactly-same-type-p cur-tag-info
orig-tag-info)))
- ;; just pass
- (setq rlt nil)
- (cond
- ((and (< orig-type 2) (= cur-type 2))
- (setq rlt (evilmi-sdk-member cur-keyword (nth 2 (nth orig-row-idx
match-tags)))))
-
- ((and (< cur-type 2) (= orig-type 2))
- (setq rlt (evilmi-sdk-member orig-keyword (nth 2 (nth cur-row-idx
match-tags)))))
-
- (t
- (setq rlt (= (nth 0 orig-tag-info) (nth 0 cur-tag-info)))))))
+ ;; multiple open tags might share the same end tag
+ (cond
+ ((and (evilmi-sdk-strictly-type-p cur-tag-info orig-tag-info)
+ (not (evilmi-sdk-exactly-same-type-p cur-tag-info orig-tag-info)))
+ ;; just pass
+ (setq rlt nil))
+
+ ((and (< orig-type 2) (= cur-type 2))
+ (setq rlt (evilmi-sdk-member cur-keyword (nth 2 (nth orig-row-idx
match-tags)))))
+
+ ((and (< cur-type 2) (= orig-type 2))
+ (setq rlt (evilmi-sdk-member orig-keyword (nth 2 (nth cur-row-idx
match-tags)))))
+
+ (t
+ (setq rlt (= (nth 0 orig-tag-info) (nth 0 cur-tag-info))))))
+
rlt))
;;;###autoload
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/evil-matchit fe4cc5243a: clean code and fixed ci,
ELPA Syncer <=