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

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

[nongnu] elpa/evil-matchit d2e7b21038 061/244: remove duplicated code


From: ELPA Syncer
Subject: [nongnu] elpa/evil-matchit d2e7b21038 061/244: remove duplicated code
Date: Thu, 6 Jan 2022 02:58:49 -0500 (EST)

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

    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))



reply via email to

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