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

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

[nongnu] elpa/evil-indent-plus 5633e34d8e 05/13: Use cl-lib functions/ma


From: ELPA Syncer
Subject: [nongnu] elpa/evil-indent-plus 5633e34d8e 05/13: Use cl-lib functions/macros instead of cl.el
Date: Thu, 6 Jan 2022 04:58:12 -0500 (EST)

branch: elpa/evil-indent-plus
commit 5633e34d8eaec334f09fec0c69de8c4d72a447e8
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>

    Use cl-lib functions/macros instead of cl.el
    
    And add cl-lib dependency.
---
 evil-indent-plus.el | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/evil-indent-plus.el b/evil-indent-plus.el
index b2c30f6943..a8d0c8cc88 100644
--- a/evil-indent-plus.el
+++ b/evil-indent-plus.el
@@ -7,7 +7,7 @@
 ;; Version: 1.0.0
 ;; Keywords: convenience evil
 ;; URL: http://github.com/TheBB/evil-indent-plus
-;; Package-Requires: ((evil "0"))
+;; Package-Requires: ((evil "0") (cl-lib "0.5"))
 ;;
 ;; This file is not part of GNU Emacs.
 
@@ -77,11 +77,11 @@ the last line where predicate holds."
                  (point-max)))
           (pt (point)))
       (when skip (forward-line direction))
-      (loop while (and (/= (point) bnd) (funcall predicate))
-            do (progn
-                 (when before (setq pt (point-at-bol)))
-                 (forward-line direction)
-                 (unless before (setq pt (point-at-bol)))))
+      (cl-loop while (and (/= (point) bnd) (funcall predicate))
+               do (progn
+                    (when before (setq pt (point-at-bol)))
+                    (forward-line direction)
+                    (unless before (setq pt (point-at-bol)))))
       pt)))
 
 (defun evil-indent-plus--same-indent-range (&optional point)
@@ -101,31 +101,31 @@ If `point' is supplied and non-nil it will return the 
begin and end of the block
 
 (defun evil-indent-plus--up-indent-range (&optional point)
   (let* ((range (evil-indent-plus--same-indent-range point))
-         (base (third range))
-         (begin (evil-indent-plus--seek (first range)
+         (base (cl-third range))
+         (begin (evil-indent-plus--seek (cl-first range)
                                         -1 nil nil
                                         'evil-indent-plus--geq-or-empty-p)))
-    (list begin (second range) base)))
+    (list begin (cl-second range) base)))
 
 (defun evil-indent-plus--up-down-indent-range (&optional point)
   (let* ((range (evil-indent-plus--same-indent-range point))
-         (base (third range))
-         (begin (evil-indent-plus--seek (first range)
+         (base (cl-third range))
+         (begin (evil-indent-plus--seek (cl-first range)
                                         -1 nil nil
                                         'evil-indent-plus--geq-or-empty-p))
-         (end (evil-indent-plus--seek (second range)
+         (end (evil-indent-plus--seek (cl-second range)
                                       1 nil nil
                                       'evil-indent-plus--geq-or-empty-p)))
     (list begin end base)))
 
 (defun evil-indent-plus--linify (range)
-  (let ((nbeg (save-excursion (goto-char (first range)) (point-at-bol)))
-        (nend (save-excursion (goto-char (second range)) (point-at-eol))))
+  (let ((nbeg (save-excursion (goto-char (cl-first range)) (point-at-bol)))
+        (nend (save-excursion (goto-char (cl-second range)) (point-at-eol))))
     (evil-range nbeg nend 'line)))
 
 (defun evil-indent-plus--extend (range)
-  (let ((begin (first range))
-        (end (second range))
+  (let ((begin (cl-first range))
+        (end (cl-second range))
         nend)
     (setq nend (evil-plus-indent--seek end 1 t t 
'evil-plus-indent--empty-line-p))
     (when (= nend end)



reply via email to

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