]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer incf to cl-incf in emacs-lisp/*.el
authorStefan Kangas <stefankangas@gmail.com>
Sat, 22 Feb 2025 23:13:21 +0000 (00:13 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 23 Feb 2025 08:21:06 +0000 (09:21 +0100)
* lisp/emacs-lisp/backtrace.el (backtrace--print-func-and-args):
* lisp/emacs-lisp/bindat.el (bindat--type):
* lisp/emacs-lisp/bytecomp.el (byte-recompile-directory):
* lisp/emacs-lisp/chart.el (chart-file-count):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer, cl--print-table):
* lisp/emacs-lisp/cl-generic.el (cl--defmethod-doc-pos):
* lisp/emacs-lisp/cl-indent.el (common-lisp-loop-part-indentation)
(common-lisp-indent-function-1, lisp-indent-defmethod):
* lisp/emacs-lisp/cl-lib.el (cl--set-substring):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause):
* lisp/emacs-lisp/cl-preloaded.el (cl-struct-define):
* lisp/emacs-lisp/cl-print.el (cl-print--cons-tail)
(cl-print--vector-contents, cl-print--struct-contents)
(cl-print--string-props):
* lisp/emacs-lisp/cl-seq.el (cl-substitute):
* lisp/emacs-lisp/comp-cstr.el (comp--range-union)
(comp--range-intersection):
* lisp/emacs-lisp/comp.el (comp-vec-append, comp--gen-counter)
(comp--op-case, comp--limplify-lap-inst, comp--limplify-block)
(comp--limplify-function, comp--maybe-add-vmvar, comp--fwprop*):
* lisp/emacs-lisp/edebug.el (edebug--called-interactively-skip):
* lisp/emacs-lisp/eldoc.el (eldoc--invoke-strategy):
* lisp/emacs-lisp/elp.el (elp--make-wrapper):
* lisp/emacs-lisp/ert-x.el (ert-kill-all-test-buffers):
* lisp/emacs-lisp/ert.el (ert--stats-set-test-and-result)
(ert-write-junit-test-summary-report):
* lisp/emacs-lisp/memory-report.el (memory-report--symbol-plist)
(memory-report--object-size-1):
* lisp/emacs-lisp/oclosure.el (oclosure--index-table)
(oclosure--define-functions):
* lisp/emacs-lisp/package.el (package-menu--perform-transaction):
* lisp/emacs-lisp/smie.el (smie-set-prec2tab, smie-prec2->grammar)
(smie-config--guess, smie-config--guess-1):
* lisp/emacs-lisp/syntax.el (syntax-propertize-rules)
(syntax-ppss--update-stats):
* lisp/emacs-lisp/track-changes.el (track-changes--after): Prefer incf
to cl-incf.

(cherry picked from commit ae37a1cc3d93d3703b43c5ab2d10f1f3e146cf90)

24 files changed:
lisp/emacs-lisp/backtrace.el
lisp/emacs-lisp/bindat.el
lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/chart.el
lisp/emacs-lisp/cl-extra.el
lisp/emacs-lisp/cl-generic.el
lisp/emacs-lisp/cl-indent.el
lisp/emacs-lisp/cl-lib.el
lisp/emacs-lisp/cl-macs.el
lisp/emacs-lisp/cl-preloaded.el
lisp/emacs-lisp/cl-print.el
lisp/emacs-lisp/cl-seq.el
lisp/emacs-lisp/comp-cstr.el
lisp/emacs-lisp/comp.el
lisp/emacs-lisp/edebug.el
lisp/emacs-lisp/eldoc.el
lisp/emacs-lisp/elp.el
lisp/emacs-lisp/ert-x.el
lisp/emacs-lisp/ert.el
lisp/emacs-lisp/memory-report.el
lisp/emacs-lisp/oclosure.el
lisp/emacs-lisp/smie.el
lisp/emacs-lisp/syntax.el
lisp/emacs-lisp/track-changes.el

index aec6f4207088e1b39c38c1dbc01e7d29be124607..b395a13b0dd2c9094af89c2d813f11f91870c962 100644 (file)
@@ -750,7 +750,7 @@ Format it according to VIEW."
       (let ((fun-and-args (cons fun args)))
         (insert (backtrace--print-to-string fun-and-args)))
       ;; Skip the open-paren.
-      (cl-incf fun-beg)))
+      (incf fun-beg)))
     (when fun-file
       (make-text-button fun-beg
                         (or fun-end
index c70a7474cdcf3012564c6b8482bd0d588eb823ae..c40cc0d53c8011034f75abc48429997424d253e2 100644 (file)
@@ -682,7 +682,7 @@ is the name of a variable that will hold the value we need to pack.")
 (cl-defmethod bindat--type (op (_ (eql 'byte)))
   (bindat--pcase op
     ('unpack `(bindat--unpack-u8))
-    (`(length . ,_) `(cl-incf bindat-idx 1))
+    (`(length . ,_) `(incf bindat-idx 1))
     (`(pack . ,args) `(bindat--pack-u8 . ,args))))
 
 (cl-defmethod bindat--type (op (_ (eql 'uint))  n &optional le)
@@ -690,7 +690,7 @@ is the name of a variable that will hold the value we need to pack.")
     (bindat--pcase op
       ('unpack
        `(if ,le (bindat--unpack-uintr ,n) (bindat--unpack-uint ,n)))
-      (`(length . ,_) `(cl-incf bindat-idx (/ ,n 8)))
+      (`(length . ,_) `(incf bindat-idx (/ ,n 8)))
       (`(pack . ,args)
        `(if ,le (bindat--pack-uintr ,n . ,args)
           (bindat--pack-uint ,n . ,args))))))
@@ -698,14 +698,14 @@ is the name of a variable that will hold the value we need to pack.")
 (cl-defmethod bindat--type (op (_ (eql 'str))   len)
   (bindat--pcase op
     ('unpack `(bindat--unpack-str ,len))
-    (`(length . ,_) `(cl-incf bindat-idx ,len))
+    (`(length . ,_) `(incf bindat-idx ,len))
     (`(pack . ,args) `(bindat--pack-str ,len . ,args))))
 
 (cl-defmethod bindat--type (op (_ (eql 'strz))  &optional len)
   (bindat--pcase op
     ('unpack `(bindat--unpack-strz ,len))
     (`(length ,val)
-     `(cl-incf bindat-idx ,(cond
+     `(incf bindat-idx ,(cond
                             ;; Optimizations if len is a literal number or nil.
                             ((null len) `(1+ (length ,val)))
                             ((numberp len) len)
@@ -716,11 +716,11 @@ is the name of a variable that will hold the value we need to pack.")
 (cl-defmethod bindat--type (op (_ (eql 'bits))  len)
   (bindat--pcase op
     ('unpack `(bindat--unpack-bits ,len))
-    (`(length . ,_) `(cl-incf bindat-idx ,len))
+    (`(length . ,_) `(incf bindat-idx ,len))
     (`(pack . ,args) `(bindat--pack-bits ,len . ,args))))
 
 (cl-defmethod bindat--type (_op (_ (eql 'fill))  len)
-  `(progn (cl-incf bindat-idx ,len) nil))
+  `(progn (incf bindat-idx ,len) nil))
 
 (cl-defmethod bindat--type (_op (_ (eql 'align)) len)
   `(progn (cl-callf bindat--align bindat-idx ,len) nil))
@@ -747,7 +747,7 @@ is the name of a variable that will hold the value we need to pack.")
             (let `#'(lambda (,val) (setq bindat-idx (+ bindat-idx ,len))) fun)
             (guard (not (macroexp--fgrep `((,val)) len))))
        ;; Optimize the case where the size of each element is constant.
-       `(cl-incf bindat-idx (* ,count ,len)))
+       `(incf bindat-idx (* ,count ,len)))
       ;; FIXME: It's tempting to use `(mapc (lambda (,val) ,exp) ,val)'
       ;; which would be more efficient when `val' is a list,
       ;; but that's only right if length of `val' is indeed `count'.
index 3484374be3f50b625ea10ada373f875595f18957..c4d7ac0dfdd1711b5e7c4bf9e97a6d54f6ebe825 100644 (file)
@@ -2065,7 +2065,7 @@ also be compiled."
                         (not (member source (dir-locals--all-files directory)))
                         ;; File is requested to be ignored
                         (not (string-match-p ignore-files-regexp source)))
-                   (progn (cl-incf
+                   (progn (incf
                            (pcase (byte-recompile-file source force arg)
                              ('no-byte-compile skip-count)
                              ('t file-count)
index 5c45dc7a75d6198429b05034253f1e287eb67327..008b25e9f2f5e3d1a5fe9c272d61ce4e2d590371 100644 (file)
@@ -633,7 +633,7 @@ argument to `chart-sort' to sort the lists if desired."
             (m (member s extlst)))
        (unless (null s)
          (if m
-              (cl-incf (car (nthcdr (- (length extlst) (length m)) cntlst)))
+              (incf (car (nthcdr (- (length extlst) (length m)) cntlst)))
            (setq extlst (cons s extlst)
                   cntlst (cons 1 cntlst))))))
     ;; Let's create the chart!
index 2d9b8d0b0f1b952a1dfeff6d4f686268126957fd..0ebc89a32870370413074ba7d92697c2be320d51 100644 (file)
@@ -441,8 +441,8 @@ as an integer unless JUNK-ALLOWED is non-nil."
                  (setq start (1+ start)))))
       (skip-whitespace)
       (let ((sign (cl-case (and (< start end) (aref string start))
-                   (?+ (cl-incf start) +1)
-                   (?- (cl-incf start) -1)
+                    (?+ (incf start) +1)
+                    (?- (incf start) -1)
                    (t  +1)))
            digit sum)
        (while (and (< start end)
@@ -910,7 +910,7 @@ Call `cl--find-class' to get TYPE's propname `cl--class'"
                                   `(space :align-to ,(+ col col-space)))
                       "%s")
               formats)
-        (cl-incf col (+ col-space (aref cols i))))
+        (incf col (+ col-space (aref cols i))))
       (let ((format (mapconcat #'identity (nreverse formats))))
         (insert (apply #'format format
                        (mapcar (lambda (str) (propertize str 'face 'italic))
index 0fa29fd6c1380b423a47f284c519f78d1e35814d..71538a653bc298ae25dc7f322baeca43117e5827 100644 (file)
@@ -509,7 +509,7 @@ Presumes point is at the end of the `cl-defmethod' symbol."
     (let ((n 2))
       (while (and (ignore-errors (forward-sexp 1) t)
                   (not (eq (char-before) ?\))))
-        (cl-incf n))
+        (incf n))
       n)))
 
 ;;;###autoload
index 0695edc3d1240dd04f56c6028ed0ef48838d809b..5ea7015adf0010e6ce52a334f5d0030b84aa1a78 100644 (file)
@@ -179,13 +179,13 @@ the standard Lisp indent package."
     (when (and (eq lisp-indent-backquote-substitution-mode 'corrected))
       (save-excursion
         (goto-char (elt state 1))
-        (cl-incf loop-indentation
-                 (cond ((eq (char-before) ?,) -1)
-                       ((and (eq (char-before) ?@)
-                             (progn (backward-char)
-                                    (eq (char-before) ?,)))
-                        -2)
-                       (t 0)))))
+        (incf loop-indentation
+              (cond ((eq (char-before) ?,) -1)
+                    ((and (eq (char-before) ?@)
+                          (progn (backward-char)
+                                 (eq (char-before) ?,)))
+                     -2)
+                    (t 0)))))
 
     (goto-char indent-point)
     (beginning-of-line)
@@ -400,9 +400,9 @@ instead."
                      ;; ",(...)" or ",@(...)"
                      (when (eq lisp-indent-backquote-substitution-mode
                                'corrected)
-                       (cl-incf sexp-column -1)
+                       (incf sexp-column -1)
                        (when (eq (char-after (1- containing-sexp)) ?\@)
-                         (cl-incf sexp-column -1)))
+                         (incf sexp-column -1)))
                      (cond (lisp-indent-backquote-substitution-mode
                             (setf tentative-calculated normal-indent)
                             (setq depth lisp-indent-maximum-backtracking)
@@ -706,7 +706,7 @@ optional\\|rest\\|key\\|allow-other-keys\\|aux\\|whole\\|body\\|environment\
                (forward-sexp 2)
                (skip-chars-forward " \t\n")
                (while (looking-at "\\sw\\|\\s_")
-                 (cl-incf nqual)
+                  (incf nqual)
                  (forward-sexp)
                  (skip-chars-forward " \t\n"))
                (> nqual 0)))
index 2ab2f9f9022e769a2f61ea7bd2182c2bfd377f47..c4843573eccdea4eb109a098b721a0b2988da391 100644 (file)
@@ -162,9 +162,9 @@ to an element already in the list stored in PLACE.
                  val))
 
 (defun cl--set-substring (str start end val)
-  (if end (if (< end 0) (cl-incf end (length str)))
+  (if end (if (< end 0) (incf end (length str)))
     (setq end (length str)))
-  (if (< start 0) (cl-incf start (length str)))
+  (if (< start 0) (incf start (length str)))
   (concat (and (> start 0) (substring str 0 start))
          val
          (and (< end (length str)) (substring str end))))
@@ -448,7 +448,7 @@ SEQ, this is like `mapcar'.  With several, it is like the Common Lisp
 ;;With optional argument N, returns Nth-to-last link (default 1)."
 ;;  (if n
 ;;      (let ((m 0) (p x))
-;;     (while (consp p) (cl-incf m) (pop p))
+;;      (while (consp p) (incf m) (pop p))
 ;;     (if (<= n 0) p
 ;;       (if (< n m) (nthcdr (- m n) x) x)))
 ;;    (while (consp (cdr x)) (pop x))
index 58f65c1c7d17eac09e63724cb396a180626bac47..48d8a9c9a7f721465b854272219a112383c3f237 100644 (file)
@@ -1598,12 +1598,12 @@ For more details, see Info node `(cl)Loop Facility'.
      ((memq word '(sum summing))
       (let ((what (pop cl--loop-args))
            (var (cl--loop-handle-accum 0)))
-       (push `(progn (cl-incf ,var ,what) t) cl--loop-body)))
+        (push `(progn (incf ,var ,what) t) cl--loop-body)))
 
      ((memq word '(count counting))
       (let ((what (pop cl--loop-args))
            (var (cl--loop-handle-accum 0)))
-       (push `(progn (if ,what (cl-incf ,var)) t) cl--loop-body)))
+        (push `(progn (if ,what (incf ,var)) t) cl--loop-body)))
 
      ((memq word '(minimize minimizing maximize maximizing))
       (push `(progn ,(macroexp-let2 macroexp-copyable-p temp
index 0399b1791252b5210ddfff48e1a2f761aacf9a17..7017fcd5b8360c7a026f36f264a3afe316e86eec 100644 (file)
                                   (car slot) (nth 1 slot)
                                   type props)))
                      (puthash (car slot) (+ i offset) index-table)
-                     (cl-incf i))
+                     (incf i))
                    v))
          (class (cl--struct-new-class
                  name docstring
index 427f32862b20be389cb73dd4813a3d51899ec218..62cda07ac73ab82e05252e51367b9dccfb43af69 100644 (file)
@@ -100,7 +100,7 @@ Print the contents hidden by the ellipsis to STREAM."
           (cl-print-object (pop object) stream)
         (cl-print-insert-ellipsis object t stream)
         (setq object nil))
-      (cl-incf count))
+      (incf count))
     (when object
       (princ " . " stream) (cl-print-object object stream))))
 
@@ -123,7 +123,7 @@ Print the contents hidden by the ellipsis to STREAM."
     (while (< i limit)
       (unless (= i start) (princ " " stream))
       (cl-print-object (aref object i) stream)
-      (cl-incf i))
+      (incf i))
     (when (< limit len)
       (princ " " stream)
       (cl-print-insert-ellipsis object limit stream))))
@@ -298,7 +298,7 @@ into a button whose action shows the function's disassembly.")
         (princ (cl--slot-descriptor-name slot) stream)
         (princ " " stream)
         (cl-print-object (aref object (1+ i)) stream))
-      (cl-incf i))
+      (incf i))
     (when (< limit len)
       (princ " " stream)
       (cl-print-insert-ellipsis object limit stream))))
@@ -369,7 +369,7 @@ primitives such as `prin1'.")
           (princ start-pos stream)
           (princ " " stream) (princ end-pos stream)
           (princ " " stream) (cl-print-object props stream)
-          (cl-incf interval-count))
+          (incf interval-count))
         (setq start-pos end-pos
               end-pos (next-property-change start-pos object len))))
     (when (< start-pos len)
index e9c1e531656b7730d6fad94d186acd7e20be5a8a..6e51b895b46cc9c15887605416bba0187a86ae79 100644 (file)
@@ -439,7 +439,7 @@ to avoid corrupting the original SEQ.
          (setq cl-seq (copy-sequence cl-seq))
          (unless cl-from-end
            (setf (elt cl-seq cl-i) cl-new)
-           (cl-incf cl-i)
+            (incf cl-i)
            (decf cl-count))
          (apply 'cl-nsubstitute cl-new cl-old cl-seq :count cl-count
                 :start cl-i cl-keys))))))
index 3cab66a719986501404701a88456c92dfee2e874..7931118361ba4d98af601433fffb15036e09274e 100644 (file)
@@ -447,7 +447,7 @@ Return them as multiple value."
    do
    (when (zerop nest)
      (setf low i))
-   (cl-incf nest)
+   (incf nest)
    else
    do
    (when (= nest 1)
@@ -476,7 +476,7 @@ Return them as multiple value."
                (cl-return '()))
    if (eq x 'l)
    do
-   (cl-incf nest)
+   (incf nest)
    (when (= nest n-ranges)
      (setf low i))
    else
index 2577d8bc7fb741379ac3550d40a2193be7453aa1..bd80a3890b007dd3d9f79ec9104c8027443cad84 100644 (file)
@@ -334,7 +334,7 @@ Useful to hook into pass checkers.")
   "Append ELT into VEC.
 Returns ELT."
   (puthash (comp-vec-end vec) elt (comp-vec-data vec))
-  (cl-incf (comp-vec-end vec))
+  (incf (comp-vec-end vec))
   elt)
 
 (defsubst comp-vec-prepend (vec elt)
@@ -492,7 +492,7 @@ non local exit (ends with an `unreachable' insn)."))
   "Return a sequential number generator."
   (let ((n -1))
     (lambda ()
-      (cl-incf n))))
+      (incf n))))
 
 (cl-defstruct (comp-func (:copier nil))
   "LIMPLE representation of a function."
@@ -1302,7 +1302,7 @@ and the annotation emission."
                           ;;      ,(concat "LAP op " op-name)))
                           ;; Emit the stack adjustment if present.
                           ,(when (and sp-delta (not (eq 0 sp-delta)))
-                            `(cl-incf (comp--sp) ,sp-delta))
+                             `(incf (comp--sp) ,sp-delta))
                           ,@(comp--body-eff body op-name sp-delta))
                 else
                collect `(',op (signal 'native-ice
@@ -1336,7 +1336,7 @@ and the annotation emission."
                              (make--comp-mvar :constant arg)
                              (comp--slot+1))))
       (byte-call
-       (cl-incf (comp--sp) (- arg))
+       (incf (comp--sp) (- arg))
        (comp--emit-set-call (comp--callref 'funcall (1+ arg) (comp--sp))))
       (byte-unbind
        (comp--emit (comp--call 'helper_unbind_n
@@ -1491,19 +1491,19 @@ and the annotation emission."
       (byte-numberp auto)
       (byte-integerp auto)
       (byte-listN
-       (cl-incf (comp--sp) (- 1 arg))
+       (incf (comp--sp) (- 1 arg))
        (comp--emit-set-call (comp--callref 'list arg (comp--sp))))
       (byte-concatN
-       (cl-incf (comp--sp) (- 1 arg))
+       (incf (comp--sp) (- 1 arg))
        (comp--emit-set-call (comp--callref 'concat arg (comp--sp))))
       (byte-insertN
-       (cl-incf (comp--sp) (- 1 arg))
+       (incf (comp--sp) (- 1 arg))
        (comp--emit-set-call (comp--callref 'insert arg (comp--sp))))
       (byte-stack-set
        (comp--copy-slot (1+ (comp--sp)) (- (comp--sp) arg -1)))
       (byte-stack-set2 (cl-assert nil)) ;; TODO
       (byte-discardN
-       (cl-incf (comp--sp) (- arg)))
+       (incf (comp--sp) (- arg)))
       (byte-switch
        ;; Assume to follow the emission of a setimm.
        ;; This is checked into comp--emit-switch.
@@ -1513,7 +1513,7 @@ and the annotation emission."
       (byte-constant
        (comp--emit-setimm arg))
       (byte-discardN-preserve-tos
-       (cl-incf (comp--sp) (- arg))
+       (incf (comp--sp) (- arg))
        (comp--copy-slot (+ arg (comp--sp)))))))
 
 (defun comp--emit-narg-prologue (minarg nonrest rest)
@@ -1722,7 +1722,7 @@ into the C code forwarding the compilation unit."
    for inst = (car inst-cell)
    for next-inst = (car-safe (cdr inst-cell))
    do (comp--limplify-lap-inst inst)
-      (cl-incf (comp-limplify-pc comp-pass))
+      (incf (comp-limplify-pc comp-pass))
    when (comp--lap-fall-through-p inst)
    do (pcase next-inst
         (`(TAG ,_label . ,label-sp)
@@ -1755,7 +1755,7 @@ into the C code forwarding the compilation unit."
       (let ((args (comp-func-l-args func)))
         (if (comp-args-p args)
             (cl-loop for i below (comp-args-max args)
-                     do (cl-incf (comp--sp))
+                     do (incf (comp--sp))
                         (comp--emit `(set-par-to-local ,(comp--slot) ,i)))
           (comp--emit-narg-prologue (comp-args-base-min args)
                                    (comp-nargs-nonrest args)
@@ -1898,10 +1898,10 @@ The assume is emitted at the beginning of the block BB."
 (defun comp--maybe-add-vmvar (op cmp-res insns-seq)
   "If CMP-RES is clobbering OP emit a new constrained mvar and return it.
 Return OP otherwise."
-  (if-let ((match (eql (comp-mvar-slot op) (comp-mvar-slot cmp-res)))
-           (new-mvar (make--comp-mvar
-                      :slot
-                      (- (cl-incf (comp-func-vframe-size comp-func))))))
+  (if-let* ((match (eql (comp-mvar-slot op) (comp-mvar-slot cmp-res)))
+            (new-mvar (make--comp-mvar
+                       :slot
+                       (- (incf (comp-func-vframe-size comp-func))))))
       (progn
         (push `(assume ,new-mvar ,op) (cdr insns-seq))
         new-mvar)
@@ -2768,7 +2768,7 @@ Return t if something was changed."
                                  (comp--copy-insn insn))
                do
                (comp--fwprop-insn insn)
-               (cl-incf i)
+               (incf i)
                when (and (null modified) (not (equal insn orig-insn)))
                  do (setf modified t))
                when (> i comp--fwprop-max-insns-scan)
index 8ade4cddc817466bab7aa742175f015202d57af5..3033e8378f57b7a328f41b2b5496413d9b64c146 100644 (file)
@@ -4594,8 +4594,8 @@ With prefix argument, make it a temporary breakpoint."
     (let ((s 1))
       (while (memq (nth 1 (backtrace-frame i 'called-interactively-p))
                    '(edebug-enter edebug-default-enter))
-        (cl-incf s)
-        (cl-incf i))
+        (incf s)
+        (incf i))
       s)))
 
 ;; Finally, hook edebug into the rest of Emacs.
index c965048a83d4e3050abdb6f68f0d1a3dabb82bcb..26049844447056b15315fbf95c447065679bbc8e 100644 (file)
@@ -872,7 +872,7 @@ the docstrings eventually produced, using
            interactive))
          (make-callback
           (method origin)
-          (let ((pos (prog1 howmany (cl-incf howmany))))
+          (let ((pos (prog1 howmany (incf howmany))))
             (cl-ecase method
               (:enthusiast
                (lambda (string &rest plist)
@@ -889,7 +889,7 @@ the docstrings eventually produced, using
                                     nil #'display-doc))
                  t))
               (:patient
-               (cl-incf want)
+               (incf want)
                (lambda (string &rest plist)
                  (register-doc pos string plist origin)
                  (when (zerop (decf want)) (display-doc))
index bb99bef55ccf24dbf4617df872dc18126ba2e6fd..784baf55c7ba702c62772366db547353924f91eb 100644 (file)
@@ -395,11 +395,11 @@ original definition, use \\[elp-restore-function] or \\[elp-restore-all]."
         ;; we are recording times
         (let (enter-time)
           ;; increment the call-counter
-          (cl-incf (aref info 0))
+          (incf (aref info 0))
          (setq enter-time (current-time)
                result (apply func args))
           ;; calculate total time in function
-          (cl-incf (aref info 1) (elp-elapsed-time enter-time nil))
+          (incf (aref info 1) (elp-elapsed-time enter-time nil))
           ))
       ;; turn off recording if this is the master function
       (if (and elp-master
index f3bc7d0bede5090baf0fdc22d8642e1d23a32c65..3a58749b3b1adebe9245281b9e6f7aa9a3ddf148 100644 (file)
@@ -140,7 +140,7 @@ BODY."
     (maphash (lambda (buffer _dummy)
               (when (or (not (buffer-live-p buffer))
                         (kill-buffer buffer))
-                (cl-incf count)))
+                 (incf count)))
             ert--test-buffers)
     (message "%s out of %s test buffers killed"
             count (hash-table-count ert--test-buffers)))
index fb4dd82381cf0fb5a2700ef1710bcd436ad6d55e..5825807595a393fffac52834a4576272cb8df497 100644 (file)
@@ -1152,21 +1152,21 @@ Also changes the counters in STATS to match."
                                                 (aref results pos))
                     (cl-etypecase (aref results pos)
                       (ert-test-passed
-                       (cl-incf (ert--stats-passed-expected stats) d))
+                       (incf (ert--stats-passed-expected stats) d))
                       (ert-test-failed
-                       (cl-incf (ert--stats-failed-expected stats) d))
+                       (incf (ert--stats-failed-expected stats) d))
                      (ert-test-skipped
-                       (cl-incf (ert--stats-skipped stats) d))
+                       (incf (ert--stats-skipped stats) d))
                       (null)
                       (ert-test-aborted-with-non-local-exit)
                       (ert-test-quit))
                   (cl-etypecase (aref results pos)
                     (ert-test-passed
-                     (cl-incf (ert--stats-passed-unexpected stats) d))
+                     (incf (ert--stats-passed-unexpected stats) d))
                     (ert-test-failed
-                     (cl-incf (ert--stats-failed-unexpected stats) d))
+                     (incf (ert--stats-failed-unexpected stats) d))
                     (ert-test-skipped
-                     (cl-incf (ert--stats-skipped stats) d))
+                     (incf (ert--stats-skipped stats) d))
                     (null)
                     (ert-test-aborted-with-non-local-exit)
                     (ert-test-quit)))))
@@ -1677,8 +1677,8 @@ test packages depend on each other, it might be helpful.")
                   (insert "      </error>\n"
                           "    </testcase>\n"
                           "  </testsuite>\n")
-                  (cl-incf errors 1)
-                  (cl-incf id 1)))
+                  (incf errors 1)
+                  (incf id 1)))
 
             (insert-file-contents-literally test-report)
             (when (looking-at-p
@@ -1686,15 +1686,15 @@ test packages depend on each other, it might be helpful.")
               (delete-region (point) (line-beginning-position 2)))
             (when (looking-at
                    "<testsuites name=\".+\" tests=\"\\(.+\\)\" errors=\"\\(.+\\)\" failures=\"\\(.+\\)\" skipped=\"\\(.+\\)\" time=\"\\(.+\\)\">")
-              (cl-incf tests (string-to-number (match-string 1)))
-              (cl-incf errors  (string-to-number (match-string 2)))
-              (cl-incf failures  (string-to-number (match-string 3)))
-              (cl-incf skipped (string-to-number (match-string 4)))
-              (cl-incf time (string-to-number (match-string 5)))
+              (incf tests (string-to-number (match-string 1)))
+              (incf errors (string-to-number (match-string 2)))
+              (incf failures (string-to-number (match-string 3)))
+              (incf skipped (string-to-number (match-string 4)))
+              (incf time (string-to-number (match-string 5)))
               (delete-region (point) (line-beginning-position 2)))
             (when (looking-at "  <testsuite id=\"\\(0\\)\"")
               (replace-match (number-to-string id) nil nil nil 1)
-              (cl-incf id 1))
+              (incf id 1))
             (goto-char (point-max))
             (beginning-of-line 0)
             (when (looking-at-p "</testsuites>")
index 5b9a590c7de2d0e82ebe5e9ebe5577a2c42970e7..8ca7c0e5f0a7d4abd1b45b32f0551c8766b3405c 100644 (file)
@@ -168,7 +168,7 @@ by counted more than once."
         (total 0))
     (mapatoms
      (lambda (symbol)
-       (cl-incf total (memory-report--object-size
+       (incf total (memory-report--object-size
                        counted (symbol-plist symbol))))
      obarray)
     (list
@@ -217,16 +217,16 @@ by counted more than once."
   (let ((total 0)
         (size (memory-report--size 'cons)))
     (while value
-      (cl-incf total size)
+      (incf total size)
       (setf (gethash value counted) t)
       (when (car value)
-        (cl-incf total (memory-report--object-size counted (car value))))
+        (incf total (memory-report--object-size counted (car value))))
       (let ((next (cdr value)))
         (setq value (when next
                       (if (consp next)
                           (unless (gethash next counted)
                             (cdr value))
-                        (cl-incf total (memory-report--object-size
+                        (incf total (memory-report--object-size
                                         counted next))
                         nil)))))
     total))
@@ -235,7 +235,7 @@ by counted more than once."
   (let ((total (+ (memory-report--size 'vector)
                   (* (memory-report--size 'object) (length value)))))
     (cl-loop for elem across value
-             do (cl-incf total (memory-report--object-size counted elem)))
+             do (incf total (memory-report--object-size counted elem)))
     total))
 
 (cl-defmethod memory-report--object-size-1 (counted (value hash-table))
@@ -243,8 +243,8 @@ by counted more than once."
                   (* (memory-report--size 'object) (hash-table-size value)))))
     (maphash
      (lambda (key elem)
-       (cl-incf total (memory-report--object-size counted key))
-       (cl-incf total (memory-report--object-size counted elem)))
+       (incf total (memory-report--object-size counted key))
+       (incf total (memory-report--object-size counted elem)))
      value)
     total))
 
index 57cfcbfe2e18d0f3c16e7a0ec3398efe5ec85f15..06d98e6f05ad979dbd05ba93e0c7020398383628 100644 (file)
         (it (make-hash-table :test #'eq)))
     (dolist (desc slotdescs)
       (let* ((slot (cl--slot-descriptor-name desc)))
-        (cl-incf i)
+        (incf i)
         (when (gethash slot it)
           (error "Duplicate slot name: %S" slot))
         (setf (gethash slot it) i)))
@@ -305,7 +305,7 @@ list of slot properties.  The currently known properties are the following:
                             ;; Always use a double hyphen: if users wants to
                             ;; make it public, they can do so with an alias.
                             (aname (intern (format "%S--%S" name slot))))
-                       (cl-incf i)
+                       (incf i)
                        (if (not mutable)
                            `(defalias ',aname
                               ;; We use `oclosure--copy' instead of
index e0c2d567b4736902a9bea31cb221a4ee5919fa0d..111d413cc424781c50bf988d30d646677d9b6842 100644 (file)
             ;; don't hide real conflicts.
             (puthash key (gethash key override) table)
           (display-warning 'smie (format "Conflict: %s %s/%s %s" x old val y))
-          (cl-incf smie-warning-count))
+          (incf smie-warning-count))
       (puthash key val table))))
 
 (defun smie-precs->prec2 (precs)
@@ -585,13 +585,13 @@ PREC2 is a table as returned by `smie-precs->prec2' or
               (unless (caar cst)
                 (setcar (car cst) i)
                 ;; (smie-check-grammar table prec2 'step1)
-                (cl-incf i))
+                (incf i))
               (setq csts (delq cst csts))))
           (unless progress
             (error "Can't resolve the precedence cycle: %s"
                    (smie-debug--describe-cycle
                     table (smie-debug--prec2-cycle csts)))))
-        (cl-incf i 10))
+        (incf i 10))
       ;; Propagate equality constraints back to their sources.
       (dolist (eq (nreverse eqs))
         (when (null (cadr eq))
@@ -602,7 +602,7 @@ PREC2 is a table as returned by `smie-precs->prec2' or
           ;; So set it here rather than below since doing it below
           ;; makes it more difficult to obey the equality constraints.
           (setcar (cdr eq) i)
-          (cl-incf i))
+          (incf i))
         (cl-assert (or (null (caar eq)) (eq (caar eq) (cadr eq))))
         (setcar (car eq) (cadr eq))
         ;; (smie-check-grammar table prec2 'step2)
@@ -612,10 +612,10 @@ PREC2 is a table as returned by `smie-precs->prec2' or
       (dolist (x table)
         (unless (nth 1 x)
           (setf (nth 1 x) i)
-          (cl-incf i))                  ;See other (cl-incf i) above.
+          (incf i))                  ;See other (incf i) above.
         (unless (nth 2 x)
           (setf (nth 2 x) i)
-          (cl-incf i))))                ;See other (cl-incf i) above.
+          (incf i))))                ;See other (incf i) above.
     ;; Mark closers and openers.
     (dolist (x (gethash :smie-open/close-alist prec2))
       (let* ((token (car x))
@@ -2157,7 +2157,7 @@ position corresponding to each rule."
                  (trace (mapcar #'cdr (cdr itrace)))
                  (cur (current-indentation)))
             (when (numberp nindent)     ;Skip `noindent' and friends.
-              (cl-incf (gethash (cons (- cur nindent) trace) otraces 0)))))
+              (incf (gethash (cons (- cur nindent) trace) otraces 0)))))
         (forward-line 1)))
     (progress-reporter-done pr)
 
@@ -2193,14 +2193,14 @@ position corresponding to each rule."
                                              (let ((data (list 0 nil nil)))
                                                (puthash sig data sigs)
                                                data))))
-                           (cl-incf (nth 0 sig-data) count)
+                           (incf (nth 0 sig-data) count)
                            (push (cons count otrace) (nth 2 sig-data))
                            (let ((sig-off-data
                                   (or (assq offset (nth 1 sig-data))
                                       (let ((off-data (cons offset 0)))
                                         (push off-data (nth 1 sig-data))
                                         off-data))))
-                             (cl-incf (cdr sig-off-data) count))))))))
+                             (incf (cdr sig-off-data) count))))))))
                otraces)
 
       ;; Finally, guess the indentation rules.
@@ -2241,7 +2241,7 @@ position corresponding to each rule."
                                   off-data))))
                       (cl-assert (>= (cdr ooff-data) count))
                       (decf (cdr ooff-data) count)
-                      (cl-incf (cdr noff-data) count))))))))))
+                      (incf (cdr noff-data) count))))))))))
     rules))
 
 (defun smie-config-guess ()
index f092dcc4166a9b20497a776c3ba2957ed69a4883..f2c56f3180c1e14dc82272f6e30ec9cd341ff542 100644 (file)
@@ -276,7 +276,7 @@ all RULES in total."
                  ;; If there's more than 1 rule, and the rule want to apply
                  ;; highlight to match 0, create an extra group to be able to
                  ;; tell when *this* match 0 has succeeded.
-                 (cl-incf offset)
+                 (incf offset)
                  (setq re (concat "\\(" re "\\)")))
                (setq re (syntax-propertize--shift-groups-and-backrefs re offset))
                (let ((code '())
@@ -358,7 +358,7 @@ all RULES in total."
                              code))))
                  (push (cons condition (nreverse code))
                        branches))
-               (cl-incf offset (regexp-opt-depth orig-re))
+               (incf offset (regexp-opt-depth orig-re))
                re))
            rules
            "\\|")))
@@ -588,8 +588,8 @@ The rest is only useful if you're interested in tweaking the algorithm.")
          syntax-ppss-stats))
 (defun syntax-ppss--update-stats (i old new)
   (let ((pair (aref syntax-ppss-stats i)))
-    (cl-incf (car pair))
-    (cl-incf (cdr pair) (- new old))))
+    (incf (car pair))
+    (incf (cdr pair) (- new old))))
 
 (defun syntax-ppss--data ()
   (if (eq (point-min) 1)
index 125314fa814f73161fc694795a1b1466f130da61..1ac7feb3b77370b1e8275fe4c9503c187c93ea51 100644 (file)
@@ -594,14 +594,14 @@ Details logged to `track-changes--error-log'")
   (track-changes--trace)
   (cl-assert track-changes--state)
   (let ((offset (- (- end beg) len)))
-    (cl-incf track-changes--buffer-size offset)
+    (incf track-changes--buffer-size offset)
     (if (and (eq track-changes--before-clean 'unset)
              (not track-changes--before-no))
          ;; This can be a sign that a `before-change-functions' went missing,
          ;; or that we called `track-changes--clean-state' between
          ;; a `before-change-functions' and `after-change-functions'.
          (track-changes--before beg end)
-      (cl-incf track-changes--before-end offset))
+      (incf track-changes--before-end offset))
     (setq track-changes--before-clean nil)
     (if (not (or track-changes--before-no
                  (save-restriction