branch: elpa/evil commit 745f394bb769c9cb0ca52f4cb10bbbc5229e1841 Author: dalu <mou.t...@outlook.com> Commit: Tom Dalziel <33435574+tomd...@users.noreply.github.com>
fix: replace deprecated functions --- evil-commands.el | 10 +++++----- evil-common.el | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/evil-commands.el b/evil-commands.el index e51a2f613a..e4e679f395 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -1653,7 +1653,7 @@ given." (point)) end (save-excursion (goto-char end) - (point-at-bol count)) + (line-beginning-position count)) type 'line)) (funcall (if should-delete 'evil-delete 'evil-yank) beg end type register yank-handler)) @@ -1907,7 +1907,7 @@ but doesn't insert or remove any spaces." (point))) (end-adjusted (save-excursion (goto-char end) - (point-at-bol count-num)))) + (line-beginning-position count-num)))) (funcall join-fn beg-adjusted end-adjusted))))))) (evil-define-operator evil-fill (beg end) @@ -2346,7 +2346,7 @@ leave the cursor just after the new text." (evil-paste-before nil register t) (when (evil-replace-state-p) (setq reg-length (- (point) opoint) - chars-to-delete (min (- (point-at-eol) (point)) reg-length)) + chars-to-delete (min (- (line-end-position) (point)) reg-length)) ;; TODO: handle multi-line paste backspacing (evil-update-replace-alist (point) reg-length chars-to-delete chars-to-delete) (delete-char chars-to-delete)))) @@ -2668,7 +2668,7 @@ Adds a `^' overlay as an input prompt." (progn (if (evil-replace-state-p) (progn - (setq chars-to-delete (min (- (point-at-eol) opoint) count) + (setq chars-to-delete (min (- (line-end-position) opoint) count) insert-prompt (make-overlay opoint (+ chars-to-delete opoint))) (evil-update-replace-alist opoint count chars-to-delete)) (setq insert-prompt (make-overlay opoint opoint))) @@ -2785,7 +2785,7 @@ next VCOUNT - 1 lines below the current one." chars-to-delete insert-prompt) (if (evil-replace-state-p) (progn - (setq chars-to-delete (min (- (point-at-eol) opoint) count) + (setq chars-to-delete (min (- (line-end-position) opoint) count) insert-prompt (make-overlay opoint (+ chars-to-delete opoint))) (evil-update-replace-alist opoint count chars-to-delete)) (setq insert-prompt (make-overlay opoint opoint))) diff --git a/evil-common.el b/evil-common.el index 4afbeeb9c3..2513560577 100644 --- a/evil-common.el +++ b/evil-common.el @@ -1908,14 +1908,14 @@ position of the comment." ((eobp) pos) ((= (char-syntax (char-after)) ?<) (1+ pos)) ((and (not (zerop (logand (car (syntax-after (point))) - (lsh 1 16)))) + (ash 1 16)))) (not (zerop (logand (or (car (syntax-after (1+ (point)))) 0) - (lsh 1 17))))) + (ash 1 17))))) (+ pos 2)) ((and (not (zerop (logand (car (syntax-after (point))) - (lsh 1 17)))) + (ash 1 17)))) (not (zerop (logand (or (car (syntax-after (1- (point)))) 0) - (lsh 1 16))))) + (ash 1 16))))) (1+ pos)) (t pos)))) (let ((syn (save-excursion (syntax-ppss chkpos)))) @@ -1935,15 +1935,15 @@ of the comment opener if MOVE is non-nil." (equal (point) (evil-in-comment-p (1+ (point))))) ;; two character opener on first char ((and (not (zerop (logand (car (syntax-after (point))) - (lsh 1 16)))) + (ash 1 16)))) (not (zerop (logand (or (car (syntax-after (1+ (point)))) 0) - (lsh 1 17))))) + (ash 1 17))))) (equal (point) (evil-in-comment-p (+ 2 (point))))) ;; two character opener on second char ((and (not (zerop (logand (car (syntax-after (point))) - (lsh 1 17)))) + (ash 1 17)))) (not (zerop (logand (or (car (syntax-after (1- (point)))) 0) - (lsh 1 16))))) + (ash 1 16))))) (and (equal (1- (point)) (evil-in-comment-p (1+ (point)))) (prog1 t (when move (backward-char))))))) @@ -1963,17 +1963,17 @@ closer if MOVE is non-nil." (prog1 t (when move (forward-char))))) ;; two char closer on first char ((and (not (zerop (logand (car (syntax-after (point))) - (lsh 1 18)))) + (ash 1 18)))) (not (zerop (logand (or (car (syntax-after (1+ (point)))) 0) - (lsh 1 19))))) + (ash 1 19))))) (and (evil-in-comment-p) (not (evil-in-comment-p (+ (point) 2))) (prog1 t (when move (forward-char 2))))) ;; two char closer on second char ((and (not (zerop (logand (car (syntax-after (point))) - (lsh 1 19)))) + (ash 1 19)))) (not (zerop (logand (or (car (syntax-after (1- (point)))) 0) - (lsh 1 18))))) + (ash 1 18))))) (and (evil-in-comment-p) (not (evil-in-comment-p (1+ (point)))) (prog1 t (when move (forward-char)))))))