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

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

[nongnu] elpa/evil-args b2bfdab464 18/27: Declare interactive commands a


From: ELPA Syncer
Subject: [nongnu] elpa/evil-args b2bfdab464 18/27: Declare interactive commands as evil-motions separately from their definitions.
Date: Wed, 2 Feb 2022 20:58:12 -0500 (EST)

branch: elpa/evil-args
commit b2bfdab464e5969df99b5632c2af7eda54d57553
Author: wcsmith <wconnorsmith@gmail.com>
Commit: wcsmith <wconnorsmith@gmail.com>

    Declare interactive commands as evil-motions separately from their 
definitions.
---
 evil-args.el | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/evil-args.el b/evil-args.el
index 54853ff7a1..84a93aaf0c 100644
--- a/evil-args.el
+++ b/evil-args.el
@@ -145,17 +145,19 @@
     (evil-next-line)
     (evil-first-non-blank)))
 
-;;;###autoload (autoload 'evil-backward-arg "evil-args")
-(evil-define-motion evil-backward-arg (count)
+;;;###autoload
+(defun evil-backward-arg (count)
   "Move the cursor backward COUNT arguments."
+  (interactive "p")
   (let ((delimiters-regexp (regexp-opt evil-args-delimiters)))
     (evil-args--backward-arg-no-skip
      (+ (if (looking-back (concat delimiters-regexp
                                  "[\t\n ]*")) 1 0) (or count 1)))))
 
-;;;###autoload (autoload 'evil-forward-arg "evil-args")
-(evil-define-motion evil-forward-arg (count)
+;;;###autoload
+(defun evil-forward-arg (count)
   "Move the cursor forward COUNT arguments."
+  (interactive "p")
   (let ((closers-regexp (regexp-opt evil-args-closers)))
   (evil-args--forward-delimiter (or count 1))
   (when (not (looking-at-p closers-regexp))
@@ -166,14 +168,14 @@
       (evil-next-line)
       (evil-first-non-blank)))))
 
-;;;###autoload (autoload 'evil-inner-arg "evil-args")
+;;;###autoload
 (evil-define-text-object evil-inner-arg (count &optional beg end type)
   "Select inner delimited argument."
   (let ((begin (save-excursion (evil-args--backward-arg-no-skip 1) (point)))
         (end (save-excursion (evil-args--forward-delimiter) (point))))
     (evil-range begin end)))
 
-;;;###autoload (autoload 'evil-outer-arg "evil-args")
+;;;###autoload
 (evil-define-text-object evil-outer-arg (count &optional beg end type)
   "Select a delimited argument."
   (let ((openers-regexp (regexp-opt evil-args-openers))
@@ -196,9 +198,10 @@
         (setq begin (point))))
      (evil-range begin end)))
 
-;;;###autoload (autoload 'evil-jump-out-args "evil-args")
-(evil-define-motion evil-jump-out-args (count)
-  "Move cursor out of the nearest enclosing matching pairs."
+;;;###autoload
+(defun evil-jump-out-args (count)
+  "Move the cursor out of the nearest enclosing matching pairs."
+  (interactive "p")
   (setq count (or count 1))
   (let ((openers-regexp (regexp-opt evil-args-openers))
        (closers-regexp (regexp-opt evil-args-closers))
@@ -229,5 +232,10 @@
        (if begin (goto-char begin)))
       (setq count (- count 1)))))
 
+;; declare evil motions
+(evil-declare-motion 'evil-forward-arg)
+(evil-declare-motion 'evil-backward-arg)
+(evil-declare-motion 'evil-jump-out-args)
+
 (provide 'evil-args)
 ;;; evil-args.el ends here



reply via email to

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