]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer incf to cl-incf in tests
authorStefan Kangas <stefankangas@gmail.com>
Sat, 22 Feb 2025 18:14:51 +0000 (19:14 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 23 Feb 2025 08:20:33 +0000 (09:20 +0100)
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-reify-function):
* test/lisp/emacs-lisp/cl-extra-tests.el (cl-getf):
* test/lisp/emacs-lisp/cl-macs-tests.el
(cl-macs-loop-for-as-arith-order-side-effects)
(cl-macs-loop-for-as-equals-then, cl-macs-loop-do, cl-macs-loop-finally)
(cl-macs-loop-in-ref, cl-macs-loop-being-elements-of-ref)
(cl-macs-test--symbol-macrolet, cl-the):
* test/lisp/emacs-lisp/cl-seq-tests.el (cl-lib-test-remove)
(cl-lib-test-remove-if-not):
* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
(edebug-test-code-range):
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-deduplicate):
* test/lisp/emacs-lisp/generator-tests.el (cps-while-incf):
(cps-test-iter-cleanup-once-only):
* test/lisp/emacs-lisp/hierarchy-tests.el
(hierarchy-labelfn-button-if-does-not-button-unless-condition)
(hierarchy-labelfn-button-if-does-button-when-condition):
* test/lisp/emacs-lisp/let-alist-tests.el (let-alist-evaluate-once):
* test/lisp/emacs-lisp/lisp-mode-tests.el
(indent-sexp, lisp-indent-region):
* test/lisp/emacs-lisp/map-tests.el (test-map-elt-gv)
(test-setf-map-with-function):
* test/lisp/emacs-lisp/multisession-tests.el (multi-test-sqlite-simple)
(multi-test-sqlite-busy, multi-test-files-simple)
(multi-test-files-busy):
* test/lisp/emacs-lisp/oclosure-tests.el
(oclosure-test, oclosure-test-mutate):
* test/lisp/emacs-lisp/track-changes-tests.el
(track-changes-tests--random):
* test/lisp/files-tests.el (files-tests--with-buffer-offer-save):
* test/lisp/net/shr-tests.el (shr-test/zoom-image):
* test/lisp/replace-tests.el (replace-tests-with-undo):
* test/src/buffer-tests.el (test-overlay-randomly):
* test/src/data-tests.el (test-bool-vector-bv-from-hex-string):
* test/src/fns-tests.el (fns-tests-sort):
* test/src/json-tests.el (json-insert/signal, json-insert/throw):
* test/src/minibuf-tests.el (minibuf-tests--strings-to-symbol-alist)
(minibuf-tests--strings-to-string-alist)
(minibuf-tests--strings-to-string-hashtable)
(minibuf-tests--strings-to-symbol-hashtable):
* test/src/process-tests.el (make-process/file-handler/found): Prefer
incf to cl-incf.

(cherry picked from commit 042dc5929b706b5fbc0ea8ada6014661d44a1b53)

23 files changed:
test/lisp/emacs-lisp/bytecomp-tests.el
test/lisp/emacs-lisp/cl-extra-tests.el
test/lisp/emacs-lisp/cl-macs-tests.el
test/lisp/emacs-lisp/cl-seq-tests.el
test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
test/lisp/emacs-lisp/edebug-tests.el
test/lisp/emacs-lisp/generator-tests.el
test/lisp/emacs-lisp/hierarchy-tests.el
test/lisp/emacs-lisp/let-alist-tests.el
test/lisp/emacs-lisp/lisp-mode-tests.el
test/lisp/emacs-lisp/map-tests.el
test/lisp/emacs-lisp/multisession-tests.el
test/lisp/emacs-lisp/oclosure-tests.el
test/lisp/emacs-lisp/track-changes-tests.el
test/lisp/files-tests.el
test/lisp/net/shr-tests.el
test/lisp/replace-tests.el
test/src/buffer-tests.el
test/src/data-tests.el
test/src/fns-tests.el
test/src/json-tests.el
test/src/minibuf-tests.el
test/src/process-tests.el

index d5f76fd0230437fe961b6396d85d21e26ce9591a..8b0c1dad4c03fd49ebee4ff47cea90a9ccc52fac 100644 (file)
@@ -1812,7 +1812,7 @@ compiled correctly."
   (cl-letf ((lexical-binding t)
             ((symbol-function 'counter) nil))
     (let ((x 0))
-      (defun counter () (cl-incf x))
+      (defun counter () (incf x))
       (should (equal (counter) 1))
       (should (equal (counter) 2))
       ;; byte compiling should not cause counter to always return the
index c524f77f2bb567420aecef52415148e18632c3df..41753194c1b2d17c7233e5c336a3bec3b58a1ada 100644 (file)
     (should (eq (cl-getf plist 'x) 1))
     (should-not (cl-getf plist 'y :none))
     (should (eq (cl-getf plist 'z :none) :none))
-    (should (eq (cl-incf (cl-getf plist 'x 10) 2) 3))
+    (should (eq (incf (cl-getf plist 'x 10) 2) 3))
     (should (equal plist '(x 3 y nil)))
-    (should-error (cl-incf (cl-getf plist 'y 10) 4) :type 'wrong-type-argument)
+    (should-error (incf (cl-getf plist 'y 10) 4) :type 'wrong-type-argument)
     (should (equal plist '(x 3 y nil)))
-    (should (eq (cl-incf (cl-getf plist 'z 10) 5) 15))
+    (should (eq (incf (cl-getf plist 'z 10) 5) 15))
     (should (equal plist '(z 15 x 3 y nil))))
   (let ((plist '(x 1 y)))
     (should (eq (cl-getf plist 'x) 1))
     (should (eq (cl-getf plist 'y :none) :none))
     (should (eq (cl-getf plist 'z :none) :none))
-    (should (eq (cl-incf (cl-getf plist 'x 10) 2) 3))
+    (should (eq (incf (cl-getf plist 'x 10) 2) 3))
     (should (equal plist '(x 3 y)))
-    (should (eq (cl-incf (cl-getf plist 'y 10) 4) 14))
+    (should (eq (incf (cl-getf plist 'y 10) 4) 14))
     (should (equal plist '(y 14 x 3 y))))
   (let ((plist '(x 1 y . 2)))
     (should (eq (cl-getf plist 'x) 1))
-    (should (eq (cl-incf (cl-getf plist 'x 10) 2) 3))
+    (should (eq (incf (cl-getf plist 'x 10) 2) 3))
     (should (equal plist '(x 3 y . 2)))
     (should-error (cl-getf plist 'y :none) :type 'wrong-type-argument)
     (should-error (cl-getf plist 'z :none) :type 'wrong-type-argument)))
index bca5a12e3987ee30ac78db06f3c27e7fee807f51..a3118c9b5566631c9ef1749164a5abebab0c6de5 100644 (file)
   "Test side effects generated by different arithmetic phrase order."
   :expected-result :failed
   (should
-   (equal (let ((x 1)) (cl-loop for i from x to 10 by (cl-incf x) collect i))
+   (equal (let ((x 1)) (cl-loop for i from x to 10 by (incf x) collect i))
           '(1 3 5 7 9)))
   (should
-   (equal (let ((x 1)) (cl-loop for i from x by (cl-incf x) to 10 collect i))
+   (equal (let ((x 1)) (cl-loop for i from x by (incf x) to 10 collect i))
           '(1 3 5 7 9)))
   (should
-   (equal (let ((x 1)) (cl-loop for i to 10 from x by (cl-incf x) collect i))
+   (equal (let ((x 1)) (cl-loop for i to 10 from x by (incf x) collect i))
           '(1 3 5 7 9)))
   (should
-   (equal (let ((x 1)) (cl-loop for i to 10 by (cl-incf x) from x collect i))
+   (equal (let ((x 1)) (cl-loop for i to 10 by (incf x) from x collect i))
           '(2 4 6 8 10)))
   (should
-   (equal (let ((x 1)) (cl-loop for i by (cl-incf x) from x to 10 collect i))
+   (equal (let ((x 1)) (cl-loop for i by (incf x) from x to 10 collect i))
           '(2 4 6 8 10)))
   (should
-   (equal (let ((x 1)) (cl-loop for i by (cl-incf x) to 10 from x collect i))
+   (equal (let ((x 1)) (cl-loop for i by (incf x) to 10 from x collect i))
           '(2 4 6 8 10))))
 
 (ert-deftest cl-macs-loop-for-as-arith-invalid ()
   (should (equal (cl-loop for x below 3 for y = (+ 10 x) nconc (list x y))
                  '(0 10 1 11 2 12)))
   (should (equal (cl-loop with start = 5
-                          for x = start then (cl-incf start)
+                          for x = start then (incf start)
                           repeat 5
                           collect x)
                  '(5 6 7 8 9))))
@@ -324,7 +324,7 @@ collection clause."
                  '(3 10 2 10 1 10)))
   (should (equal (cl-loop with res = 0
                           for i from 1 to 10
-                          doing (cl-incf res i)
+                          doing (incf res i)
                           finally (cl-return res))
                  55))
   (should (equal (cl-loop for i from 10
@@ -412,7 +412,7 @@ collection clause."
 (ert-deftest cl-macs-loop-finally ()
   (should (eql (cl-loop for i from 10
                         finally
-                          (cl-incf i 10)
+                          (incf i 10)
                           (cl-return i)
                         while (< i 20))
                30)))
@@ -421,7 +421,7 @@ collection clause."
 (ert-deftest cl-macs-loop-in-ref ()
   (should (equal (cl-loop with my-list = (list 1 2 3 4 5)
                           for x in-ref my-list
-                          do (cl-incf x)
+                          do (incf x)
                           finally return my-list)
                  '(2 3 4 5 6))))
 
@@ -443,7 +443,7 @@ collection clause."
 (ert-deftest cl-macs-loop-being-elements-of-ref ()
   (should (equal (let ((var (list 1 2 3 4 5)))
                    (cl-loop for x being the elements of-ref var
-                            do (cl-incf x)
+                            do (incf x)
                             finally return var))
                  '(2 3 4 5 6))))
 
@@ -576,7 +576,7 @@ collection clause."
                    (let ((cl (car l)))
                      (cl-symbol-macrolet
                          ((p (gv-synthetic-place cl (lambda (v) `(setcar l ,v)))))
-                       (cl-incf p)))
+                       (incf p)))
                    l)
                  '(1)))
   ;; Make sure `gv-synthetic-place' isn't macro-expanded before
@@ -981,7 +981,7 @@ See Bug#57915."
   (should (eql (cl-the integer 42) 42))
   (should-error (cl-the integer "abc"))
   (let ((side-effect 0))
-    (should (= (cl-the integer (cl-incf side-effect)) 1))
+    (should (= (cl-the integer (incf side-effect)) 1))
     (should (= side-effect 1))))
 
 (ert-deftest cl-lib-test-typep ()
index 3e05ff639d77e9a97bfd4b5e45eba9d2d22c1b52..6d9cec6f76ccaa77aeec71658bbe1a1bdb07e669 100644 (file)
@@ -109,13 +109,13 @@ Additionally register an `ert-info' to help identify test failures."
                              (should (eql x (nth key-index list)))
                              (prog1
                                  (list key-index x)
-                               (cl-incf key-index)))
+                               (incf key-index)))
                       :test
                       (lambda (a b)
                         (should (eql a 'foo))
                         (should (equal b (list test-index
                                                (nth test-index list))))
-                        (cl-incf test-index)
+                        (incf test-index)
                         (member test-index '(2 3))))))
       (should (equal key-index 4))
       (should (equal test-index 4))
@@ -160,7 +160,7 @@ Additionally register an `ert-info' to help identify test failures."
         (i 0))
     (let ((result (cl-remove-if-not (lambda (x)
                                       (should (eql x (nth i list)))
-                                      (cl-incf i)
+                                      (incf i)
                                       (member i '(2 3)))
                                     list)))
       (should (equal i 4))
index 9f5b459c0e448628eb936bdfa25222c6c03a98f6..24981bb63cfa8a7e6fde53daa0fc776253208073 100644 (file)
@@ -43,7 +43,7 @@
         (result nil))
     (while !lt!(< index num)!test!
       (push index result)!loop!
-      (cl-incf index))!end-loop!
+      (incf index))!end-loop!
     (nreverse result)))
 
 (defun edebug-test-code-choices (input)
index e56a89c7a72bd57099d79df6ebb6910c1582e970..02eadd34c8df99ce87a2b654b72cfeb3fe4178cf 100644 (file)
@@ -329,7 +329,7 @@ evaluate to \"symbol\", \"symbol-1\", \"symbol-2\", etc."
            (progn
              (push (cons ,g-name 0) ,names-and-numbers)
              ,g-name)
-         (cl-incf (cdr ,g-duplicate))
+         (incf (cdr ,g-duplicate))
          (format "%s-%s" ,g-name (cdr ,g-duplicate))))))
 
 (defun edebug-tests-setup-code-file (tmpfile)
index 773619d8f03731eb9e53f23f6c50eefdebb14a0f..01d2f978909540110d4119545950e8f397227041 100644 (file)
@@ -113,7 +113,7 @@ identical output."
 (cps-testcase cps-while-incf
  (let* ((i 0) (j 10))
    (while (< i 10)
-     (cl-incf i)
+     (incf i)
      (setf j (+ j (* i 10))))
    j))
 
@@ -273,7 +273,7 @@ identical output."
                             (iter-yield 1)
                             (error "Test")
                             (iter-yield 2))
-                       (cl-incf nr-unwound))))))
+                       (incf nr-unwound))))))
     (should (equal (iter-next iter) 1))
     (should-error (iter-next iter))
     (should (equal nr-unwound 1))))
index 3333f4014e6c133cdee1c3a052cdcfef04cccb59..947a3854233c33d4420cce9a000ef2c1f95e0dd0 100644 (file)
   (let ((labelfn-base (lambda (_item _indent) (insert "foo")))
         (spy-count 0)
         (condition (lambda (_item _indent) nil)))
-    (cl-letf (((symbol-function 'hierarchy-labelfn-button) (lambda (_labelfn _actionfn) (lambda (_item _indent) (cl-incf spy-count)))))
+    (cl-letf (((symbol-function 'hierarchy-labelfn-button) (lambda (_labelfn _actionfn) (lambda (_item _indent) (incf spy-count)))))
       (funcall (hierarchy-labelfn-button-if labelfn-base condition #'identity) nil nil)
       (should (equal spy-count 0)))))
 
   (let ((labelfn-base (lambda (_item _indent) (insert "foo")))
         (spy-count 0)
         (condition (lambda (_item _indent) t)))
-    (cl-letf (((symbol-function 'hierarchy-labelfn-button) (lambda (_labelfn _actionfn) (lambda (_item _indent) (cl-incf spy-count)))))
+    (cl-letf (((symbol-function 'hierarchy-labelfn-button) (lambda (_labelfn _actionfn) (lambda (_item _indent) (incf spy-count)))))
       (funcall (hierarchy-labelfn-button-if labelfn-base condition #'identity) nil nil)
       (should (equal spy-count 1)))))
 
index 1d04e91ab10aac140e02fd984cd00af4c36e2652..988b05b488cb5928dbf2db942d09a74c1a4c4e75 100644 (file)
@@ -69,9 +69,9 @@
     (should
      (equal
       (let-alist (list
-                  (cons 'test-two (cl-incf let-alist--test-counter))
-                  (cons 'test-three (cl-incf let-alist--test-counter)))
-        (list .test-one .test-two .test-two .test-three .cl-incf))
+                  (cons 'test-two (incf let-alist--test-counter))
+                  (cons 'test-three (incf let-alist--test-counter)))
+        (list .test-one .test-two .test-two .test-three .incf))
       '(nil 1 1 2 nil)))))
 
 (ert-deftest let-alist-remove-dot ()
index f6d191ec4c57985b9584e68eba5d322b876d922b..1c2e0c2d01db5d853655ffbcffe599fa83d1f0ca 100644 (file)
@@ -71,7 +71,7 @@ noindent\" 3
             (while (not (eobp))
               (unless (looking-at "noindent\\|^[[:blank:]]*$")
                 (insert (make-string n ?\s)))
-              (cl-incf n)
+              (incf n)
               (forward-line))))
         (indent-sexp)
         (should (equal (buffer-string) correct))))))
@@ -194,7 +194,7 @@ a(A) -->
           (while (not (eobp))
             (unless (looking-at "noindent\\|^[[:blank:]]*$")
               (insert (make-string n ?\s)))
-            (cl-incf n)
+            (incf n)
             (forward-line))))
       (indent-region (point-min) (point-max))
       (should (equal (buffer-string) correct)))))
index fe4438b51ad9aaf2bf94e98fdaa6b753e24f1c04..ce0f2b082751deedde1b8170f81d925b322ed361 100644 (file)
@@ -121,49 +121,49 @@ Evaluate BODY for each created map."
   (let ((sort (lambda (map) (sort (map-pairs map) #'car-less-than-car))))
     (with-empty-maps-do map
       ;; Empty map, without default.
-      (should-error (cl-incf (map-elt map 1)) :type 'wrong-type-argument)
+      (should-error (incf (map-elt map 1)) :type 'wrong-type-argument)
       (with-suppressed-warnings ((callargs map-elt))
-        (should-error (cl-incf (map-elt map 1.0 nil #'=))
+        (should-error (incf (map-elt map 1.0 nil #'=))
                       :type 'wrong-type-argument))
       (should (map-empty-p map))
       ;; Empty map, with default.
       (if (vectorp map)
           (progn
-            (should-error (cl-incf (map-elt map 1 3)) :type 'args-out-of-range)
+            (should-error (incf (map-elt map 1 3)) :type 'args-out-of-range)
             (with-suppressed-warnings ((callargs map-elt))
-              (should-error (cl-incf (map-elt map 1 3 #'=))
+              (should-error (incf (map-elt map 1 3 #'=))
                             :type 'args-out-of-range))
             (should (map-empty-p map)))
-        (should (= (cl-incf (map-elt map 1 3) 10) 13))
+        (should (= (incf (map-elt map 1 3) 10) 13))
         (with-suppressed-warnings ((callargs map-elt))
-          (should (= (cl-incf (map-elt map 2.0 5 #'=) 12) 17)))
+          (should (= (incf (map-elt map 2.0 5 #'=) 12) 17)))
         (should (equal (funcall sort map) '((1 . 13) (2.0 . 17))))))
     (with-maps-do map
       ;; Nonempty map, without predicate.
-      (should (= (cl-incf (map-elt map 1 3) 10) 14))
+      (should (= (incf (map-elt map 1 3) 10) 14))
       (should (equal (funcall sort map) '((0 . 3) (1 . 14) (2 . 5))))
       ;; Nonempty map, with predicate.
       (with-suppressed-warnings ((callargs map-elt))
         (pcase-exhaustive map
           ((pred consp)
-           (should (= (cl-incf (map-elt map 2.0 6 #'=) 12) 17))
+           (should (= (incf (map-elt map 2.0 6 #'=) 12) 17))
            (should (equal (funcall sort map) '((0 . 3) (1 . 14) (2 . 17))))
-           (should (= (cl-incf (map-elt map 0 7 #'=) 13) 16))
+           (should (= (incf (map-elt map 0 7 #'=) 13) 16))
            (should (equal (funcall sort map) '((0 . 16) (1 . 14) (2 . 17)))))
           ((pred vectorp)
-           (should-error (cl-incf (map-elt map 2.0 6 #'=))
+           (should-error (incf (map-elt map 2.0 6 #'=))
                          :type 'wrong-type-argument)
            (should (equal (funcall sort map) '((0 . 3) (1 . 14) (2 . 5))))
-           (should (= (cl-incf (map-elt map 2 6 #'=) 12) 17))
+           (should (= (incf (map-elt map 2 6 #'=) 12) 17))
            (should (equal (funcall sort map) '((0 . 3) (1 . 14) (2 . 17))))
-           (should (= (cl-incf (map-elt map 0 7 #'=) 13) 16))
+           (should (= (incf (map-elt map 0 7 #'=) 13) 16))
            (should (equal (funcall sort map) '((0 . 16) (1 . 14) (2 . 17)))))
           ((pred hash-table-p)
-           (should (= (cl-incf (map-elt map 2.0 6 #'=) 12) 18))
+           (should (= (incf (map-elt map 2.0 6 #'=) 12) 18))
            (should (member (funcall sort map)
                            '(((0 . 3) (1 . 14) (2 . 5) (2.0 . 18))
                              ((0 . 3) (1 . 14) (2.0 . 18) (2 . 5)))))
-           (should (= (cl-incf (map-elt map 0 7 #'=) 13) 16))
+           (should (= (incf (map-elt map 0 7 #'=) 13) 16))
            (should (member (funcall sort map)
                            '(((0 . 16) (1 . 14) (2 . 5) (2.0 . 18))
                              ((0 . 16) (1 . 14) (2.0 . 18) (2 . 5)))))))))))
@@ -718,7 +718,7 @@ See bug#58531#25 and bug#58563."
         (map nil))
     (setf (map-elt map 'foo)
           (funcall (lambda ()
-                     (cl-incf num))))
+                     (incf num))))
     (should (equal map '((foo . 1))))
     ;; Check that the function is only called once.
     (should (= num 1))))
index 4c5da5eed5d94a8c7100ac41f086ae52bf802eba..d2e39f662e9b88fb1e81fccf76060a91a568b999 100644 (file)
@@ -41,7 +41,7 @@
               ""
               :synchronized t)
             (should (= (multisession-value multisession--foo) 0))
-            (cl-incf (multisession-value multisession--foo))
+            (incf (multisession-value multisession--foo))
             (should (= (multisession-value multisession--foo) 1))
             (call-process
              (concat invocation-directory invocation-name)
@@ -56,7 +56,7 @@
                             (define-multisession-variable multisession--foo 0
                               ""
                               :synchronized t)
-                            (cl-incf (multisession-value multisession--foo))))))
+                            (incf (multisession-value multisession--foo))))))
             (should (= (multisession-value multisession--foo) 2)))
         (sqlite-close multisession--db)
         (setq multisession--db nil)))))
@@ -75,7 +75,7 @@
               ""
               :synchronized t)
             (should (= (multisession-value multisession--bar) 0))
-            (cl-incf (multisession-value multisession--bar))
+            (incf (multisession-value multisession--bar))
             (should (= (multisession-value multisession--bar) 1))
             (setq proc
                   (start-process
                                   (define-multisession-variable multisession--bar 0
                                     "" :synchronized t)
                                   (dotimes (i 100)
-                                    (cl-incf (multisession-value multisession--bar))))))))
+                                    (incf (multisession-value multisession--bar))))))))
             (while (process-live-p proc)
               (ignore-error sqlite-locked-error
                 (message "multisession--bar %s" (multisession-value multisession--bar))
-                ;;(cl-incf (multisession-value multisession--bar))
+                ;;(incf (multisession-value multisession--bar))
                 )
               (sleep-for 0.1))
             (message "multisession--bar ends up as %s" (multisession-value multisession--bar))
         ""
         :synchronized t)
       (should (= (multisession-value multisession--sfoo) 0))
-      (cl-incf (multisession-value multisession--sfoo))
+      (incf (multisession-value multisession--sfoo))
       (should (= (multisession-value multisession--sfoo) 1))
       ;; On Windows and Haiku, we don't have sub-second resolution, so
       ;; let some time pass to make the "later" logic work.
                       (define-multisession-variable multisession--sfoo 0
                         ""
                         :synchronized t)
-                      (cl-incf (multisession-value multisession--sfoo))))))
+                      (incf (multisession-value multisession--sfoo))))))
       (should (= (multisession-value multisession--sfoo) 2)))))
 
 (ert-deftest multi-test-files-busy ()
         ""
         :synchronized t)
       (should (= (multisession-value multisession--sbar) 0))
-      (cl-incf (multisession-value multisession--sbar))
+      (incf (multisession-value multisession--sbar))
       (should (= (multisession-value multisession--sbar) 1))
       (setq proc
             (start-process
                             (define-multisession-variable multisession--sbar 0
                               "" :synchronized t)
                             (dotimes (i 100)
-                              (cl-incf (multisession-value multisession--sbar))))))))
+                              (incf (multisession-value multisession--sbar))))))))
       (while (process-live-p proc)
         (message "multisession--sbar %s" (multisession-value multisession--sbar))
-        ;;(cl-incf (multisession-value multisession--sbar))
+        ;;(incf (multisession-value multisession--sbar))
         (sleep-for 0.1))
       (message "multisession--sbar ends up as %s" (multisession-value multisession--sbar))
       (should (< (multisession-value multisession--sbar) 200)))))
index 38eec091ed0ad1e1a8313e009e345a82f59babf0..beebe68b3f4c5cd98b1d92f88f20c2811f35a9d1 100644 (file)
@@ -45,7 +45,7 @@
          (ocl1 (oclosure-lambda (oclosure-test (fst 1) (snd 2) (name "hi"))
                    ()
                  (list fst snd i)))
-         (ocl2 (oclosure-lambda (oclosure-test (name (cl-incf i)) (fst (cl-incf i)))
+         (ocl2 (oclosure-lambda (oclosure-test (name (incf i)) (fst (incf i)))
                    ()
                  (list fst snd 152 i))))
     (should (equal (list (oclosure-test--fst ocl1)
     (should (equal (oclosure-test-mut--mut f) 3))
     (should (equal (funcall f 5) 8))
     (should (equal (funcall f2 5) 58))
-    (cl-incf (oclosure-test-mut--mut f) 7)
+    (incf (oclosure-test-mut--mut f) 7)
     (should (equal (oclosure-test-mut--mut f) 10))
     (should (equal (funcall f 5) 15))
     (should (equal (funcall f2 15) 68))))
index ef276af53e7b6f0691af0d6b05d85b4fcebe4fe9..6499deb78d6aa7b66eb7a0ce1572b818bd60d28e 100644 (file)
@@ -73,8 +73,8 @@
                              (should (eq before3
                                          (if (symbolp before)
                                              before (length before)))))))
-                    (cl-incf (aref sync-counts (1- n)))
-                    (cl-incf (aref char-counts (1- n)) (- end beg))
+                    (incf (aref sync-counts (1- n)))
+                    (incf (aref char-counts (1- n)) (- end beg))
                     (let ((after (buffer-substring beg end)))
                       (track-changes-tests--message
                        "Sync:\n    %S\n=>  %S\nat %d .. %d"
index 7f06c37a408f7b3a3a923970c4b3fa33440e410a..0e4f649d3d10124857d7d6cc36f9e44caa792bcc 100644 (file)
@@ -2023,7 +2023,7 @@ CALLERS-DIR specifies the value to let-bind
                   (((symbol-function 'read-key)
                     ;; Increase counter and answer 'n' when prompted
                     ;; to save a buffer.
-                    (lambda (&rest _) (cl-incf nb-saved-buffers) ?n))
+                    (lambda (&rest _) (incf nb-saved-buffers) ?n))
                    ;; Do not kill Emacs.
                    ((symbol-function 'kill-emacs) #'ignore)
                    (save-some-buffers-default-predicate callers-dir))
index a69d9f53ef6c2cf78e25afe5bc15eae84a9d468a..363cd144e8f3aee6026ec1dd1cd7ea94ff414e4f 100644 (file)
@@ -155,7 +155,7 @@ settings, then once more for each (OPTION . VALUE) pair.")
                      (put-image-calls 0)
                      (shr-put-image-function
                       (lambda (&rest args)
-                        (cl-incf put-image-calls)
+                        (incf put-image-calls)
                         (apply #'shr-put-image args)))
                      (shr-width 80)
                      (shr-use-fonts nil)
index de8d4e531df29131992da23b4e2f0a7332ac3b0f..07a065626f3364cb241057563286d97014be565d 100644 (file)
@@ -541,7 +541,7 @@ Return the last evalled form in BODY."
          ;; bind `read-string' as well.
          (cl-letf (((symbol-function 'read-event)
                     (lambda (&rest _args)
-                      (cl-incf ,count)
+                      (incf ,count)
                       (pcase ,count ; Build the clauses from CHAR-NUMS
                         ,@(append
                            (delq nil
index 4d608fa9d241f8cc3cc4416a6035c327b26def90..b4b9e7619867da5f1c0ac395a2f6785d75e25f3e 100644 (file)
@@ -1753,7 +1753,7 @@ quae ab illo inventore veritatis et quasi architecto beatae vitae
 dicta sunt, explicabo.  "))
 
       (while (< iteration-count iteration-target)
-        (cl-incf iteration-count)
+        (incf iteration-count)
 
         ;; Toggle GROWING if we've reached a size boundary.  The idea
         ;; is to initially steadily increase the overlay count, then
@@ -1780,7 +1780,7 @@ dicta sunt, explicabo.  "))
                    (ov (make-overlay begin end nil
                                      (= 0 (random 2)) (= 0 (random 2)))))
               (aset overlays overlay-count ov)
-              (cl-incf overlay-count)))
+              (incf overlay-count)))
            ((and (not create-overlay) (> overlay-count 0))
 
             ;; Possibly delete a random overlay.
index 44c786ac5794b4a63b2273be87e37d808a031bef..260bdb281bb584a109f144a1bef6f02040ba7201 100644 (file)
@@ -185,7 +185,7 @@ this is exactly representable and is greater than
       (dolist (n (nreverse nibbles))
         (dotimes (_ 4)
           (aset bv i (oddp n))
-          (cl-incf i)
+          (incf i)
           (setf n (ash n -1)))))
     bv))
 
index 04c436526f44d658e76213b11f7fb1cf719cfafc..ac29eb9744473c8e22d9441cc9983c4e70110b29 100644 (file)
          (counter 0)
          (my-counter (lambda ()
                        (if (< counter 500)
-                           (cl-incf counter)
+                           (incf counter)
                          (setq counter 0)
                          (garbage-collect))))
          (rand 1)
index 941caae943172c47bf2d95dd844ea07911dec907..94b6cfcffca0fa7628b8bf9a2f8aab31d774d75c 100644 (file)
@@ -357,7 +357,7 @@ Test with both unibyte and multibyte strings."
     (let ((calls 0))
       (add-hook 'after-change-functions
                 (lambda (_begin _end _length)
-                  (cl-incf calls)
+                  (incf calls)
                   (signal 'json-tests--error
                           '("Error in `after-change-functions'")))
                 :local)
@@ -371,7 +371,7 @@ Test with both unibyte and multibyte strings."
     (let ((calls 0))
       (add-hook 'after-change-functions
                 (lambda (_begin _end _length)
-                  (cl-incf calls)
+                  (incf calls)
                   (throw 'test-tag 'throw-value))
                 :local)
       (should
index ca66aa56d512c92f1798736898e6c1885f743435..03085074f8ae13be90afab755d4bd8e0451697be 100644 (file)
   (mapcar #'intern list))
 (defun minibuf-tests--strings-to-symbol-alist (list)
   (let ((num 0))
-    (mapcar (lambda (str) (cons (intern str) (cl-incf num))) list)))
+    (mapcar (lambda (str) (cons (intern str) (incf num))) list)))
 (defun minibuf-tests--strings-to-string-alist (list)
   (let ((num 0))
-    (mapcar (lambda (str) (cons str (cl-incf num))) list)))
+    (mapcar (lambda (str) (cons str (incf num))) list)))
 (defun minibuf-tests--strings-to-obarray (list)
   (let ((ob (obarray-make 7)))
     (mapc (lambda (str) (intern str ob)) list)
 (defun minibuf-tests--strings-to-string-hashtable (list)
   (let ((ht (make-hash-table :test #'equal))
         (num 0))
-    (mapc (lambda (str) (puthash str (cl-incf num) ht)) list)
+    (mapc (lambda (str) (puthash str (incf num) ht)) list)
     ht))
 (defun minibuf-tests--strings-to-symbol-hashtable (list)
   (let ((ht (make-hash-table :test #'equal))
         (num 0))
-    (mapc (lambda (str) (puthash (intern str) (cl-incf num) ht)) list)
+    (mapc (lambda (str) (puthash (intern str) (incf num) ht)) list)
     ht))
 
 ;;; Functions that produce a predicate (for *-completion functions)
index 19d28a2f69c635d876fec25e72cdae6cdcb562be..276e9af6ee108d5715a2ff6ce8ccf8cfdc80a4a6 100644 (file)
@@ -352,7 +352,7 @@ works as expected if a file name handler is found."
                (should (equal args '(make-process :name "name"
                                                   :command ("/some/binary")
                                                   :file-handler t)))
-               (cl-incf file-handler-calls)
+               (incf file-handler-calls)
                'fake-process))
       (let ((file-name-handler-alist (list (cons (rx bos "test-handler:")
                                                  #'file-handler)))