branch: elpa/evil-matchit
commit d2e7b210380d4601031cd82892050cd23d95915a
Author: Chen Bin <[email protected]>
Commit: Chen Bin <[email protected]>
remove duplicated code
---
evil-matchit-sdk.el | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/evil-matchit-sdk.el b/evil-matchit-sdk.el
index 6db1f72c40..4f4ab39c83 100644
--- a/evil-matchit-sdk.el
+++ b/evil-matchit-sdk.el
@@ -78,20 +78,11 @@ is-function-exit-point could be 'FN_EXIT' or other status"
(setq j 0)
(while (and (not found) (< j (length elems)))
(setq elem (nth j elems))
- (cond
- ((stringp elem)
- (if (string-match (concat "^" elem "$") KEYWORD)
- (setq found t)
- ))
- ((listp elem)
- (if (evilmi-sdk-member KEYWORD elem)
- (setq found t)
- ))
- )
+ (setq found (and (or (stringp elem) (listp elem))
+ (evilmi-sdk-member KEYWORD elem)))
(if (not found) (setq j (1+ j)))
)
- (if (not found) (setq i (1+ i)))
- )
+ (if (not found) (setq i (1+ i))))
(when found
;; function exit point maybe?
(if (nth 3 (nth i match-tags))