branch: elpa/evil commit 79b755e84dc53b828be939ab63c32aea75555a1e Author: Tom Dalziel <tom...@hotmail.com> Commit: Tom Dalziel <33435574+tomd...@users.noreply.github.com>
Revert forward-evil-word work --- evil-commands.el | 4 ++-- evil-common.el | 51 +++++++++++---------------------------------------- 2 files changed, 13 insertions(+), 42 deletions(-) diff --git a/evil-commands.el b/evil-commands.el index fbcc9d873e..cdf9aa3227 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -1280,7 +1280,7 @@ or line COUNT to the top of the window." (evil-define-text-object evil-inner-word (count &optional beg end type) "Select inner word." - (evil-select-inner-object 'evil-word-object beg end type count)) + (evil-select-inner-object 'evil-word beg end type count)) (evil-define-text-object evil-a-WORD (count &optional beg end type) "Select a WORD." @@ -1288,7 +1288,7 @@ or line COUNT to the top of the window." (evil-define-text-object evil-inner-WORD (count &optional beg end type) "Select inner WORD." - (evil-select-inner-object 'evil-WORD-object beg end type count)) + (evil-select-inner-object 'evil-WORD beg end type count)) (evil-define-text-object evil-a-symbol (count &optional beg end type) "Select a symbol." diff --git a/evil-common.el b/evil-common.el index 1dcb8be58e..4c25726a93 100644 --- a/evil-common.el +++ b/evil-common.el @@ -1701,26 +1701,6 @@ backwards." "Move forward COUNT whitespace sequences [[:space:]]+." (evil-forward-chars "[:space:]" count)) -(defun evil--forward-word-respect-categories (count) - "Move forward COUNT words. -A word is a sequence of word characters matching [[:word:]] -\(recognized by `forward-word')." - (let ((word-separating-categories evil-cjk-word-separating-categories) - (word-combining-categories evil-cjk-word-combining-categories) - (pnt (point))) - (forward-word count) - (if (= pnt (point)) count 0))) - -(defun evil--forward-non-word-excl-newline (count) - "Move forward COUNT non-words. -A non-word is a sequence of non-whitespace non-word characters." - (evil-forward-chars "^[:word:]\n\r\t\f " count)) - -(defun evil--forward-non-word-incl-newline (count) - "Move forward COUNT non-words. -A non-word is a sequence of non-space, non-tab, non-word characters." - (evil-forward-chars "^[:word:]\t " count)) - (defun forward-evil-word (&optional count) "Move forward COUNT words. Moves point COUNT words forward or (- COUNT) words backward if @@ -1730,18 +1710,17 @@ word is a sequence of word characters matching \[[:word:]] (recognized by `forward-word'), a sequence of non-whitespace non-word characters '[^[:word:]\\n\\r\\t\\f ]', or an empty line matching ^$." - (evil-forward-nearest count - #'evil--forward-word-respect-categories - #'evil--forward-non-word-excl-newline - #'forward-evil-empty-line)) - -(defun forward-evil-word-object (&optional count) - "Move forward COUNT words. -Like `forward-evil-word' but include newline in non-word chars." - (evil-forward-nearest count - #'evil--forward-word-respect-categories - #'evil--forward-non-word-incl-newline - #'forward-evil-empty-line)) + (evil-forward-nearest + count + #'(lambda (&optional cnt) + (let ((word-separating-categories evil-cjk-word-separating-categories) + (word-combining-categories evil-cjk-word-combining-categories) + (pnt (point))) + (forward-word cnt) + (if (= pnt (point)) cnt 0))) + #'(lambda (&optional cnt) + (evil-forward-chars "^[:word:]\n\r\t\f " cnt)) + #'forward-evil-empty-line)) (defun forward-evil-WORD (&optional count) "Move forward COUNT \"WORDS\". @@ -1755,14 +1734,6 @@ WORD is a sequence of non-whitespace characters (evil-forward-chars "^\n\r\t\f " cnt)) #'forward-evil-empty-line)) -(defun forward-evil-WORD-object (&optional count) - "Move forward COUNT \"WORDS\". -Like `forward-evil-WORD' but exclude newline in WORD chars." - (evil-forward-nearest count - #'(lambda (&optional cnt) - (evil-forward-chars "^\t " cnt)) - #'forward-evil-empty-line)) - (defun forward-evil-symbol (&optional count) "Move forward COUNT symbols. Moves point COUNT symbols forward or (- COUNT) symbols backward