[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-matchit 593c2d53a7 224/244: `evilmi-sdk-simple-jump':
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-matchit 593c2d53a7 224/244: `evilmi-sdk-simple-jump': skip comments |
Date: |
Thu, 6 Jan 2022 02:59:03 -0500 (EST) |
branch: elpa/evil-matchit
commit 593c2d53a72b56ca5913a2e24aa828a9f6e1a240
Author: Nikita Bloshchanevich <nikblos@outlook.com>
Commit: Nikita Bloshchanevich <nikblos@outlook.com>
`evilmi-sdk-simple-jump': skip comments
After the previous change, if the cursor is before some whitespace followed
by a
comment, the latter wouldn't be skipped as was the case previously. This is
because `evilmi-sdk-simple-jump' would skip to the comment, causing
`evilmi-sdk-jumpto-where' to no longer call `scan-sexp' with comment
skipping
enabled.
---
evil-matchit-sdk.el | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/evil-matchit-sdk.el b/evil-matchit-sdk.el
index 30fa1ea38e..8e8bc58fe9 100644
--- a/evil-matchit-sdk.el
+++ b/evil-matchit-sdk.el
@@ -153,7 +153,17 @@ If IS-FORWARD is t, jump forward; or else jump backward."
(defun evilmi-sdk-simple-jump ()
"Alternative for `evil-jump-item'."
(if evilmi-debug (message "evilmi-sdk-simple-jump called (point)=%d"
(point)))
- (skip-syntax-forward " ")
+ (let ((old (point)))
+ (skip-syntax-forward " ")
+ ;; If we move from a non-comment to before a comment,
+ ;; `evilmi-sdk-jumpto-where' wont skip it:
+ ;;
+ ;; <point> /* comment */ {}
+ ;;
+ ;; Is skipped because we go back, but wouldn't be if we didn't (due to
+ ;; checking for `evilmi-sdk-comment-p').
+ (when (and (not (evilmi-sdk-comment-p old)) (evilmi-sdk-comment-p (point)))
+ (goto-char old)))
(let* ((tmp (evilmi-sdk-jump-forward-p))
(jump-forward (car tmp))
;; if ff is not nil, it's jump between quotes
- [nongnu] elpa/evil-matchit 1c428e192b 149/244: ocaml use font-lock-doc-face for comment, (continued)
- [nongnu] elpa/evil-matchit 1c428e192b 149/244: ocaml use font-lock-doc-face for comment, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 0845b2a0bf 178/244: Merge pull request #109 from neojski/add-double-semicolon, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 11aa990ecb 177/244: Merge pull request #110 from leungbk/elisp, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 11d98debf8 187/244: Merge pull request #115 from dajva/jump_motion, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit bc31e7d594 199/244: clean code, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 6fd4c56855 198/244: clean code, more c unit test, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 24dcd74a55 205/244: support terminal in Emacs, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit ede6382955 206/244: enhance verilog mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 721d0a9c56 211/244: More ocaml tests, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit fccad4255b 217/244: Merge pull request #128 from leungbk/byte-comp, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 593c2d53a7 224/244: `evilmi-sdk-simple-jump': skip comments,
ELPA Syncer <=
- [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