[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-matchit e137a380ee 148/244: Merge pull request #91 fr
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-matchit e137a380ee 148/244: Merge pull request #91 from Khady/ocaml-check-keywords |
Date: |
Thu, 6 Jan 2022 02:58:57 -0500 (EST) |
branch: elpa/evil-matchit
commit e137a380ee2e10f41094f1305a11b417ed535fca
Merge: 8123eef094 2001c5be5f
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #91 from Khady/ocaml-check-keywords
ocaml: improve validation of keywords
---
evil-matchit-ocaml.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/evil-matchit-ocaml.el b/evil-matchit-ocaml.el
index e04dab6817..6b0549921f 100644
--- a/evil-matchit-ocaml.el
+++ b/evil-matchit-ocaml.el
@@ -49,10 +49,10 @@
"Build regexp to find next/previous keyword in a row."
(format "\\<\\(%s\\)\\>" (mapconcat 'identity (apply 'append tag-info)
"\\|")))
-(defun evilmi-ocaml-valid-position-p ()
- "Check if point is not in comment, string or doc"
- (not (or (evilmi-in-comment-p (point))
- (evilmi-in-string-or-doc-p (point)))))
+(defun evilmi-ocaml-in-keyword-p (pos)
+ "Check character at POS is keyword by comparing font face."
+ (evilmi-current-font-among-fonts-p pos '(tuareg-font-lock-governing-face
+ font-lock-keyword-face)))
;; jumps to next keyword. Returs nil if there's no next word
(defun evilmi-ocaml-next-possible-keyword (direction keywords-regex)
@@ -74,7 +74,7 @@ such keyword is available."
(keyword-exist-p t))
(while (and (not found-keyword-p) keyword-exist-p)
(setq keyword-exist-p (evilmi-ocaml-next-possible-keyword direction
keywords-regex))
- (if (and keyword-exist-p (evilmi-ocaml-valid-position-p))
+ (if (and keyword-exist-p (evilmi-ocaml-in-keyword-p (point)))
(setq found-keyword-p t)))
found-keyword-p))
- [nongnu] elpa/evil-matchit f397504270 204/244: clean code, (continued)
- [nongnu] elpa/evil-matchit f397504270 204/244: clean code, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 2df3a62a8b 222/244: Add a regression test, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit d7ad7f712b 235/244: emacs 28 changed API define-obsolete-function-alias. It is EVIL code. Not my code, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit d1f59ad941 225/244: Merge pull request #131 from nbfalcon/bugfix/evilmi-sdk-simple-jump-whitespace, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit ccc2cc8a62 221/244: `evilmi-sdk-simple-jump': skip whitespace, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 8862d8ea15 079/244: support for statement in lua-mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 79ec08d921 113/244: add more verilog keywords, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit e9f77f7d6a 115/244: user can use less optimized algorithm, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 304f22100e 136/244: handle ruby statement after assign operator, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 6cfdbe895f 153/244: [chen] add support for react-mode and typescript-tsx-mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit e137a380ee 148/244: Merge pull request #91 from Khady/ocaml-check-keywords,
ELPA Syncer <=
- [nongnu] elpa/evil-matchit 130941b1a4 193/244: can jump from end of html self closing tag, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 1c758b5b52 227/244: Fix byte compiling, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 2b9b68770a 219/244: fixed: cannot jump back from the line end in visual mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 69807cf829 241/244: use semantic api to improve simple jump algorithm, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 6254f7c812 220/244: fixed CI, ELPA Syncer, 2022/01/06