From: Stefan Kangas Date: Sun, 23 Feb 2025 01:55:14 +0000 (+0100) Subject: Prefer incf to cl-incf in remaining files X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=45d08cbe919bf2caa8c9d092df7dee8d759d1293;p=emacs.git Prefer incf to cl-incf in remaining files * admin/syncdoc-type-hierarchy.el (syncdoc-make-type-table): * admin/unidata/unidata-gen.el (unidata-gen-table-word-list): * lisp/arc-mode.el (archive--summarize-descs): * lisp/auth-source.el (auth-source-forget+): * lisp/battery.el (battery-linux-proc-acpi, battery-linux-sysfs): * lisp/calendar/parse-time.el (parse-time-tokenize): * lisp/calendar/time-date.el (decoded-time-add) (decoded-time--alter-month, decoded-time--alter-day): * lisp/cedet/semantic/ede-grammar.el (project-compile-target): * lisp/dired.el (dired-insert-set-properties): * lisp/edmacro.el (edmacro-format-keys): * lisp/epa-file.el (epa-file--replace-text): * lisp/eshell/esh-cmd.el (eshell-for-iterate): * lisp/eshell/esh-io.el (eshell-create-handles) (eshell-duplicate-handles, eshell-protect-handles) (eshell-copy-output-handle, eshell-buffered-print): * lisp/font-lock.el (font-lock-fontify-keywords-region): * lisp/help-fns.el: * lisp/ibuf-ext.el (ibuffer-generate-filter-groups) (ibuffer-insert-filter-group-before): * lisp/ibuffer.el (ibuffer-confirm-operation-on, ibuffer-map-lines): * lisp/image/image-dired-external.el (image-dired-thumb-queue-run): * lisp/image/image-dired.el (image-dired-display-thumbs) (image-dired-line-up): * lisp/imenu.el (imenu--split): * lisp/info-xref.el (info-xref-check-node, info-xref-check-all-custom): * lisp/international/quail.el (quail-insert-decode-map): * lisp/international/rfc1843.el (rfc1843-decode): * lisp/mail/ietf-drums-date.el (ietf-drums-date--tokenize-string): * lisp/mail/ietf-drums.el (ietf-drums-token-to-list): * lisp/mail/rfc2047.el (rfc2047-qp-or-base64): * lisp/mail/rfc2231.el (rfc2231-encode-string): * lisp/mail/yenc.el (yenc-decode-region): * lisp/mh-e/mh-e.el (mh-xargs): * lisp/mh-e/mh-folder.el (mh-recenter): * lisp/mh-e/mh-mime.el (mh-mime-part-index): * lisp/mh-e/mh-search.el (mh-search): * lisp/mh-e/mh-thread.el (mh-thread-current-indentation-level): * lisp/mh-e/mh-utils.el (mh-sub-folders-parse): * lisp/minibuffer.el (minibuffer--sort-by-position) (completion-pcm--pattern-point-idx): * lisp/mpc.el (mpc-cmd-find, mpc-cmd-move, mpc-select-extend) (mpc-songs-refresh, mpc-songpointer-score) (mpc-songpointer-refresh-hairy): * lisp/msb.el (msb--mode-menu-cond, msb--most-recently-used-menu) (msb--split-menus-2, msb--make-keymap-menu): * lisp/net/pop3.el (pop3-send-streaming-command): * lisp/net/puny.el (puny-encode-complex, puny-decode-string-internal): * lisp/net/shr-color.el (shr-color-hue-to-rgb): * lisp/net/soap-client.el (soap-encode-xs-complex-type) (soap-decode-xs-complex-type, soap-resolve-references-for-operation) (soap-wsdl-resolve-references): * lisp/play/5x5.el (5x5-made-move, 5x5-down, 5x5-right): * lisp/play/decipher.el (key, decipher-mode-syntax-table) (decipher-add-undo, decipher-complete-alphabet, decipher--analyze) (decipher--digram-counts, decipher--digram-total): * lisp/play/hanoi.el (hanoi-move-ring): * lisp/play/snake.el (snake-reset-game, snake-update-game): * lisp/profiler.el (profiler-calltree-depth, profiler-calltree-build-1) (profiler-calltree-build-unified) (profiler-calltree-compute-percentages): * lisp/registry.el (registry-reindex): * lisp/simple.el (completion-list-candidate-at-point): * lisp/strokes.el (strokes-xpm-to-compressed-string): * lisp/term.el (term-emulate-terminal, term--handle-colors-list): * lisp/treesit.el (treesit-node-index, treesit-indent-region): * lisp/url/url-cookie.el (url-cookie-parse-file-netscape): * lisp/url/url-dav.el (url-dav-file-name-completion): * lisp/url/url-queue.el (url-queue-setup-runners) (url-queue-run-queue): * lisp/wdired.el (wdired-finish-edit): * lisp/wid-edit.el (widget-move): * lisp/window-tool-bar.el (window-tool-bar-string): * lisp/winner.el (winner-undo): * lisp/xwidget.el (xwidget-webkit-isearch-forward) (xwidget-webkit-isearch-backward): Prefer incf to cl-incf. (cherry picked from commit fa0131723c3d59240c3bf9b6cd6c0d8abc4ef63f) --- diff --git a/admin/syncdoc-type-hierarchy.el b/admin/syncdoc-type-hierarchy.el index c9266da1c45..e58675c6e3c 100644 --- a/admin/syncdoc-type-hierarchy.el +++ b/admin/syncdoc-type-hierarchy.el @@ -107,7 +107,7 @@ (insert "|\n||") (setq x 0)) do (insert (symbol-name child) " ") - do (cl-incf x (1+ child-len)) ) + do (incf x (1+ child-len)) ) do (insert "\n"))) (require 'org-table) (declare-function org-table-align "org") diff --git a/admin/unidata/unidata-gen.el b/admin/unidata/unidata-gen.el index c65d10b27aa..ac3328787f0 100644 --- a/admin/unidata/unidata-gen.el +++ b/admin/unidata/unidata-gen.el @@ -1004,7 +1004,7 @@ Property value is a symbol `o' (Open), `c' (Close), or `n' (None)." (dotimes (i (length vec)) (dolist (elt (aref vec i)) (if (symbolp elt) - (cl-incf (alist-get elt (cdr word-list) 0))))) + (incf (alist-get elt (cdr word-list) 0))))) (set-char-table-range table (cons start limit) vec)))))) (setq word-list (sort (cdr word-list) #'(lambda (x y) (> (cdr x) (cdr y))))) diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 1ad9c084ed9..ad00abadc50 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -1694,7 +1694,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (t (+ (string-width uid) (string-width gid) 1))))) (if (> len maxidlen) (setq maxidlen len)))) (let ((size (archive--file-desc-size desc))) - (cl-incf totalsize size) + (incf totalsize size) (if (> size maxsize) (setq maxsize size)))) (let* ((sizelen (length (number-to-string maxsize))) (dash diff --git a/lisp/auth-source.el b/lisp/auth-source.el index eb130ccc97d..cb866e1faf1 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -852,7 +852,7 @@ while \(:host t) would find all host entries." (auth-source-specmatchp spec (cdr key))) ;; remove that key (password-cache-remove key) - (cl-incf count))) + (incf count))) password-data) count)) diff --git a/lisp/battery.el b/lisp/battery.el index 0f39b3f7087..240329e20a9 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -485,19 +485,19 @@ The following %-sequences are provided: (when (re-search-forward (rx "design capacity:" (+ space) battery--acpi-capacity eol) nil t) - (cl-incf design-capacity (string-to-number (match-string 1)))) + (incf design-capacity (string-to-number (match-string 1)))) (when (re-search-forward (rx "last full capacity:" (+ space) battery--acpi-capacity eol) nil t) - (cl-incf last-full-capacity (string-to-number (match-string 1)))) + (incf last-full-capacity (string-to-number (match-string 1)))) (when (re-search-forward (rx "design capacity warning:" (+ space) battery--acpi-capacity eol) nil t) - (cl-incf warn (string-to-number (match-string 1)))) + (incf warn (string-to-number (match-string 1)))) (when (re-search-forward (rx "design capacity low:" (+ space) battery--acpi-capacity eol) nil t) - (cl-incf low (string-to-number (match-string 1))))))) + (incf low (string-to-number (match-string 1))))))) (setq full-capacity (if (> last-full-capacity 0) last-full-capacity design-capacity)) (and capacity rate @@ -587,10 +587,10 @@ The following %-sequences are provided: (when (re-search-forward "POWER_SUPPLY_\\(CURRENT\\|POWER\\)_NOW=\\([0-9]*\\)$" nil t) - (cl-incf power-now - (* (string-to-number (match-string 2)) - (if (eq (char-after (match-beginning 1)) ?C) - voltage-now 1)))) + (incf power-now + (* (string-to-number (match-string 2)) + (if (eq (char-after (match-beginning 1)) ?C) + voltage-now 1)))) (goto-char (point-min)) (when (re-search-forward "POWER_SUPPLY_TEMP=\\([0-9]*\\)$" nil t) (setq temperature (match-string 1))) @@ -604,10 +604,10 @@ The following %-sequences are provided: (re-search-forward "POWER_SUPPLY_CHARGE_NOW=\\([0-9]*\\)$" nil t) (setq now-string (match-string 1))) - (cl-incf energy-full (* (string-to-number full-string) - voltage-now)) - (cl-incf energy-now (* (string-to-number now-string) - voltage-now))) + (incf energy-full (* (string-to-number full-string) + voltage-now)) + (incf energy-now (* (string-to-number now-string) + voltage-now))) ((and (goto-char (point-min)) (re-search-forward "POWER_SUPPLY_ENERGY_FULL=\\([0-9]*\\)$" nil t) @@ -615,8 +615,8 @@ The following %-sequences are provided: (re-search-forward "POWER_SUPPLY_ENERGY_NOW=\\([0-9]*\\)$" nil t) (setq now-string (match-string 1))) - (cl-incf energy-full (string-to-number full-string)) - (cl-incf energy-now (string-to-number now-string))))) + (incf energy-full (string-to-number full-string)) + (incf energy-now (string-to-number now-string))))) (unless (zerop power-now) (let ((remaining (if (string= charging-state "Discharging") energy-now diff --git a/lisp/calendar/parse-time.el b/lisp/calendar/parse-time.el index b1185b78134..5412010e499 100644 --- a/lisp/calendar/parse-time.el +++ b/lisp/calendar/parse-time.el @@ -63,10 +63,10 @@ letters, digits, plus or minus signs or colons." (while (< index end) (while (and (< index end) ;Skip invalid characters. (not (setq c (parse-time-string-chars (aref string index))))) - (cl-incf index)) + (incf index)) (setq start index all-digits (eq c ?0)) - (while (and (< (cl-incf index) end) ;Scan valid characters. + (while (and (< (incf index) end) ;Scan valid characters. (setq c (parse-time-string-chars (aref string index)))) (setq all-digits (and all-digits (eq c ?0)))) (if (<= index end) diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index 959c4f17571..ce8c668c8cd 100644 --- a/lisp/calendar/time-date.el +++ b/lisp/calendar/time-date.el @@ -541,13 +541,13 @@ changes in daylight saving time are not taken into account." seconds) ;; Years are simple. (when (decoded-time-year delta) - (cl-incf (decoded-time-year time) (decoded-time-year delta))) + (incf (decoded-time-year time) (decoded-time-year delta))) ;; Months are pretty simple, but start at 1 (for January). (when (decoded-time-month delta) (let ((new (+ (1- (decoded-time-month time)) (decoded-time-month delta)))) (setf (decoded-time-month time) (1+ (mod new 12))) - (cl-incf (decoded-time-year time) (/ new 12)))) + (incf (decoded-time-year time) (/ new 12)))) ;; Adjust for month length (as described in the doc string). (setf (decoded-time-day time) @@ -581,10 +581,10 @@ changes in daylight saving time are not taken into account." "Increase or decrease the month in TIME by 1." (if increase (progn - (cl-incf (decoded-time-month time)) + (incf (decoded-time-month time)) (when (> (decoded-time-month time) 12) (setf (decoded-time-month time) 1) - (cl-incf (decoded-time-year time)))) + (incf (decoded-time-year time)))) (decf (decoded-time-month time)) (when (zerop (decoded-time-month time)) (setf (decoded-time-month time) 12) @@ -594,7 +594,7 @@ changes in daylight saving time are not taken into account." "Increase or decrease the day in TIME by 1." (if increase (progn - (cl-incf (decoded-time-day time)) + (incf (decoded-time-day time)) (when (> (decoded-time-day time) (date-days-in-month (decoded-time-year time) (decoded-time-month time))) diff --git a/lisp/dired.el b/lisp/dired.el index 632399678cc..0b5f1f2f939 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1989,7 +1989,7 @@ Overlays could be added when some user options are enabled, e.g., (i 0)) (put-text-property opoint end 'invisible 'dired-hide-details-detail) (while (re-search-forward "[^ ]+" end t) - (when (member (cl-incf i) dired-hide-details-preserved-columns) + (when (member (incf i) dired-hide-details-preserved-columns) (put-text-property opoint (point) 'invisible nil)) (setq opoint (point))))) (let ((beg (point)) (end (save-excursion diff --git a/lisp/edmacro.el b/lisp/edmacro.el index 96a633fd667..b0ae2e9011a 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el @@ -560,7 +560,7 @@ doubt, use whitespace." (when (stringp macro) (cl-loop for i below (length macro) do (when (>= (aref rest-mac i) 128) - (cl-incf (aref rest-mac i) (- ?\M-\^@ 128))))) + (incf (aref rest-mac i) (- ?\M-\^@ 128))))) (while (not (eq (aref rest-mac 0) 'end-macro)) (let* ((prefix (or (and (integerp (aref rest-mac 0)) @@ -569,7 +569,7 @@ doubt, use whitespace." '(digit-argument negative-argument)) (let ((i 1)) (while (memq (aref rest-mac i) (cdr mdigs)) - (cl-incf i)) + (incf i)) (and (not (memq (aref rest-mac i) pkeys)) (prog1 (vconcat "M-" (cl-subseq rest-mac 0 i) " ") (cl-callf cl-subseq rest-mac i))))) @@ -577,7 +577,7 @@ doubt, use whitespace." (eq (key-binding [?\C-u]) 'universal-argument) (let ((i 1)) (while (eq (aref rest-mac i) ?\C-u) - (cl-incf i)) + (incf i)) (and (not (memq (aref rest-mac i) pkeys)) (prog1 (cl-loop repeat i concat "C-u ") (cl-callf cl-subseq rest-mac i))))) @@ -585,10 +585,10 @@ doubt, use whitespace." (eq (key-binding [?\C-u]) 'universal-argument) (let ((i 1)) (when (eq (aref rest-mac i) ?-) - (cl-incf i)) + (incf i)) (while (memq (aref rest-mac i) '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9)) - (cl-incf i)) + (incf i)) (and (not (memq (aref rest-mac i) pkeys)) (prog1 (vconcat "C-u " (cl-subseq rest-mac 1 i) " ") (cl-callf cl-subseq rest-mac i))))))) @@ -685,8 +685,8 @@ doubt, use whitespace." (while (not (cl-mismatch rest-mac rest-mac :start1 0 :end1 bind-len :start2 pos :end2 (+ bind-len pos))) - (cl-incf times) - (cl-incf pos bind-len)) + (incf times) + (incf pos bind-len)) (when (> times 1) (setq desc (format "%d*%s" times desc)) (setq bind-len (* bind-len times))))) @@ -706,9 +706,9 @@ doubt, use whitespace." (setq len 1)) (unless (equal res "") (cl-callf concat res " ") - (cl-incf len))) + (incf len))) (cl-callf concat res desc) - (cl-incf len (length desc))))) + (incf len (length desc))))) res)) (defun edmacro-sanitize-for-string (seq) diff --git a/lisp/epa-file.el b/lisp/epa-file.el index 366198dd893..07ca5c96c09 100644 --- a/lisp/epa-file.el +++ b/lisp/epa-file.el @@ -250,8 +250,8 @@ encryption is used." (while (and (< p1 new-start) (< p2 (point-max)) (eql (char-after p1) (char-after p2))) - (cl-incf p1) - (cl-incf p2)) + (incf p1) + (incf p2)) (delete-region new-start p2) (delete-region p1 new-start))) ;; Restore point, if possible. diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index c0674e40f2e..a6662285722 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -542,7 +542,7 @@ If ARGS is not a sequence, treat it as a list of one element." (cl-assert (and i end)) (while (< i end) (iter-yield i) - (cl-incf i)))) + (incf i)))) ((stringp arg) (iter-yield arg)) ((listp arg) diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index 94f00672c89..965b78f4bbc 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -345,7 +345,7 @@ calling this function)." (if stderr (let ((target (eshell-get-target stderr error-mode))) (cons (when target (list target)) 1)) - (cl-incf (cdr output-target)) + (incf (cdr output-target)) output-target))) (aset handles eshell-output-handle (list output-target t)) (aset handles eshell-error-handle (list error-target t)) @@ -366,15 +366,15 @@ is not shared with the original handles." (dotimes (idx eshell-number-of-handles) (when-let ((handle (aref handles idx))) (unless steal-p - (cl-incf (cdar handle))) + (incf (cdar handle))) (aset dup-handles idx (list (car handle) t)))) dup-handles)) (defun eshell-protect-handles (handles) "Protect the handles in HANDLES from a being closed." (dotimes (idx eshell-number-of-handles) - (when-let ((handle (aref handles idx))) - (cl-incf (cdar handle)))) + (when-let* ((handle (aref handles idx))) + (incf (cdar handle)))) handles) (declare-function eshell-exit-success-p "esh-cmd") @@ -442,7 +442,7 @@ If HANDLES is nil, use `eshell-current-handles'." (let* ((handles (or handles eshell-current-handles)) (handle-to-copy (car (aref handles index-to-copy)))) (when handle-to-copy - (cl-incf (cdr handle-to-copy))) + (incf (cdr handle-to-copy))) (eshell-close-handle (aref handles index) nil) (setcar (aref handles index) handle-to-copy))) @@ -527,8 +527,8 @@ When the buffer exceeds `eshell-buffered-print-size' in characters, this will flush it using `eshell-flush' (which see)." (setq eshell--buffered-print-queue (nconc eshell--buffered-print-queue strings)) - (cl-incf eshell--buffered-print-current-size - (apply #'+ (mapcar #'length strings))) + (incf eshell--buffered-print-current-size + (apply #'+ (mapcar #'length strings))) (when (> eshell--buffered-print-current-size eshell-buffered-print-size) (eshell-flush))) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 64085a8d114..fa12bd7aa53 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1713,7 +1713,7 @@ LOUDLY, if non-nil, allows progress-meter bar." ;; Fontify each item in `font-lock-keywords' from `start' to `end'. (while keywords (if loudly (message "Fontifying %s... (regexps..%s)" bufname - (make-string (cl-incf count) ?.))) + (make-string (incf count) ?.))) ;; ;; Find an occurrence of `matcher' from `start' to `end'. (setq keyword (car keywords) matcher (car keyword)) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 29e862d09e6..a97e67cf7c5 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -976,7 +976,7 @@ TYPE indicates the namespace and is `fun' or `var'." ;; (let ((count 0)) ;; (obarray-map (lambda (sym) ;; (when (or (fboundp sym) (boundp sym)) -;; (cl-incf count))) +;; (incf count))) ;; obarray) ;; count)) ;; (p (make-progress-reporter "Check first releases..." 0 count))) @@ -989,7 +989,7 @@ TYPE indicates the namespace and is `fun' or `var'." ;; (obarray-map ;; (lambda (sym) ;; (when (or (fboundp sym) (boundp sym)) -;; (cl-incf count) +;; (incf count) ;; (progress-reporter-update p count) ;; (let ((vt (progn (setq quoted t) ;; (help-fns--first-release sym))) diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index ff903325d98..b576730a6e4 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -752,7 +752,7 @@ specification, with the same structure as an element of the list (hip-crowd (cdr (assq t res))) (lamers (cdr (assq nil res)))) (aset vec i hip-crowd) - (cl-incf i) + (incf i) (setq bmarklist lamers)))) (let (ret) (dotimes (j i) @@ -901,7 +901,7 @@ See also `ibuffer-kill-filter-group'." (if (equal (car groups) group) (setq found t groups nil) - (cl-incf res) + (incf res) (setq groups (cdr groups)))) res))) (cond ((not found) diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index eedf838b224..84b2236ce67 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1111,7 +1111,7 @@ a new window in the current frame, splitting vertically." (setq trying nil)) (error ;; Handle a failure - (if (or (> (cl-incf attempts) 4) + (if (or (> (incf attempts) 4) (and (stringp (cadr err)) ;; This definitely falls in the ;; ghetto hack category... @@ -1910,18 +1910,18 @@ the buffer object itself and the current mark symbol." ;; nil if it chose not to affect the buffer ;; `kill' means the remove line from the buffer list ;; t otherwise - (cl-incf ibuffer-map-lines-total) + (incf ibuffer-map-lines-total) (cond ((null result) (forward-line 1)) ((eq result 'kill) (delete-region (line-beginning-position) (1+ (line-end-position))) - (cl-incf ibuffer-map-lines-count) + (incf ibuffer-map-lines-count) (when (< ibuffer-map-lines-total orig-target-line) (decf target-line-offset))) (t - (cl-incf ibuffer-map-lines-count) + (incf ibuffer-map-lines-count) (forward-line 1))))) ;; With `ibuffer-auto-mode' enabled, `ibuffer-expert' nil ;; and more than one marked buffer lines, the preceding loop diff --git a/lisp/image/image-dired-external.el b/lisp/image/image-dired-external.el index f09f676893d..51aa886507f 100644 --- a/lisp/image/image-dired-external.el +++ b/lisp/image/image-dired-external.el @@ -517,7 +517,7 @@ Number of simultaneous jobs is limited by `image-dired-queue-active-limit'." image-dired-queue-active-limit))) (while (and image-dired-queue (< image-dired-queue-active-jobs max-jobs)) - (cl-incf image-dired-queue-active-jobs) + (incf image-dired-queue-active-jobs) (apply #'image-dired-create-thumb-1 (pop image-dired-queue)))) ;; We are on MS-Windows with ImageMagick/GraphicsMagick, and need to ;; generate thumbnails by our lonesome selves. diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index ba577f89ae7..5034d5890cd 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -608,7 +608,7 @@ thumbnail buffer to be selected." (when (string-match-p (image-dired--file-name-regexp) file) (image-dired-insert-thumbnail (image-dired--get-create-thumbnail-file file) file dired-buf) - (cl-incf image-dired--number-of-thumbnails)))) + (incf image-dired--number-of-thumbnails)))) (if (plusp image-dired--number-of-thumbnails) (if do-not-pop (display-buffer buf) @@ -1216,9 +1216,9 @@ See also `image-dired-line-up-dynamic'." (forward-char) (if (= image-dired-thumbs-per-row 1) (insert "\n") - (cl-incf thumb-prev-pos thumb-width-chars) + (incf thumb-prev-pos thumb-width-chars) (insert (propertize " " 'display `(space :align-to ,thumb-prev-pos))) - (cl-incf seen) + (incf seen) (when (and (= seen (- image-dired-thumbs-per-row 1)) (not (eobp))) (forward-char) diff --git a/lisp/imenu.el b/lisp/imenu.el index 73063ed2d6c..9c58d541a77 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -361,7 +361,7 @@ The returned list DOES NOT share structure with LIST." (i 0)) (while remain (push (pop remain) sublist) - (cl-incf i) + (incf i) (and (= i n) ;; We have finished a sublist (progn (push (nreverse sublist) result) diff --git a/lisp/info-xref.el b/lisp/info-xref.el index 8637550c508..63df259c88f 100644 --- a/lisp/info-xref.el +++ b/lisp/info-xref.el @@ -259,11 +259,11 @@ buffer's line and column of point." ;; if the file exists, try the node (cond ((not (cdr (assoc file info-xref-xfile-alist))) - (cl-incf info-xref-unavail)) + (incf info-xref-unavail)) ((info-xref-goto-node-p node) - (cl-incf info-xref-good)) + (incf info-xref-good)) (t - (cl-incf info-xref-bad) + (incf info-xref-bad) (info-xref-output-error "No such node: %s" node))))))) @@ -482,8 +482,8 @@ and can take a long time." (if (eq :tag (cadr link)) (setq link (cddr link))) (if (info-xref-goto-node-p (cadr link)) - (cl-incf info-xref-good) - (cl-incf info-xref-bad) + (incf info-xref-good) + (incf info-xref-bad) ;; symbol-file gives nil for preloaded variables, would need ;; to copy what describe-variable does to show the right place (info-xref-output "Symbol `%s' (file %s): cannot goto node: %s" diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 84e173df79e..c090367871a 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -2419,10 +2419,10 @@ should be made by `quail-build-decode-map' (which see)." (let ((last-col-elt (or (nth (1- (* (1+ col) newrows)) single-list) (car (last single-list))))) - (cl-incf width (+ (max 3 (length (car last-col-elt))) + (incf width (+ (max 3 (length (car last-col-elt))) 1 single-trans-width 1)))) (< width window-width)) - (cl-incf cols)) + (incf cols)) (setq rows (/ (+ len cols -1) cols)) ;Round up. (let ((key-width (max 3 (length (car (nth (1- rows) single-list)))))) (insert "key") diff --git a/lisp/international/rfc1843.el b/lisp/international/rfc1843.el index 133d6f2b35c..f0bd8fb556f 100644 --- a/lisp/international/rfc1843.el +++ b/lisp/international/rfc1843.el @@ -116,15 +116,15 @@ e-mail transmission, news posting, etc." "Decode HZ WORD and return it." (let ((i -1) (s (substring word 0)) v) (if (or (not firstc) (eq firstc ?{)) - (while (< (cl-incf i) (length s)) + (while (< (incf i) (length s)) (if (eq (setq v (aref s i)) ? ) nil (aset s i (+ 128 v)))) - (while (< (cl-incf i) (length s)) + (while (< (incf i) (length s)) (if (eq (setq v (aref s i)) ? ) nil (setq v (+ (* 94 v) (aref s (1+ i)) -3135)) (aset s i (+ (/ v 157) (if (eq firstc ?<) 201 161))) (setq v (% v 157)) - (aset s (cl-incf i) (+ v (if (< v 63) 64 98)))))) + (aset s (incf i) (+ v (if (< v 63) 64 98)))))) s)) (provide 'rfc1843) diff --git a/lisp/mail/ietf-drums-date.el b/lisp/mail/ietf-drums-date.el index 0f79e9353d3..bbb27bd1f37 100644 --- a/lisp/mail/ietf-drums-date.el +++ b/lisp/mail/ietf-drums-date.el @@ -80,14 +80,14 @@ treat them as whitespace (per RFC822)." (or (> nest 0) (ietf-drums-date--ignore-char-p char) (and (not comment-eof) (eql char ?\()))) - (cl-incf index) + (incf index) ;; FWS bookkeeping. (cond ((and (eq char ?\\) (< (1+ index) end)) ;; Move to the next char but don't check ;; it to see if it might be a paren. - (cl-incf index)) - ((eq char ?\() (cl-incf nest)) + (incf index)) + ((eq char ?\() (incf nest)) ((eq char ?\)) (decf nest))))))) (skip-ignored) ;; Skip leading whitespace. (while (and (< index end) @@ -106,8 +106,8 @@ treat them as whitespace (per RFC822)." ;; RFC2?822 dates need escaping anyway, so it shouldn't ;; matter that this is not done strictly correctly. -- ;; rgr, 24-Dec-21. - (cl-incf index)) - (while (and (< (cl-incf index) end) + (incf index)) + (while (and (< (incf index) end) (setq char (aref string index)) (not (or (ietf-drums-date--ignore-char-p char) (eq char ?\()))) @@ -116,7 +116,7 @@ treat them as whitespace (per RFC822)." (when (and (eq char ?\\) (< (1+ index) end)) ;; Escaped character, see above. - (cl-incf index))) + (incf index))) (push (if all-digits (cl-parse-integer string :start start :end index) (substring string start index)) diff --git a/lisp/mail/ietf-drums.el b/lisp/mail/ietf-drums.el index 64cf7857838..be5de825b8b 100644 --- a/lisp/mail/ietf-drums.el +++ b/lisp/mail/ietf-drums.el @@ -86,7 +86,7 @@ backslash and doublequote.") b c out range) (while (< i (length token)) (setq c (aref token i)) - (cl-incf i) + (incf i) (cond ((eq c ?-) (if b @@ -95,7 +95,7 @@ backslash and doublequote.") (range (while (<= b c) (push (make-char 'ascii b) out) - (cl-incf b)) + (incf b)) (setq range nil)) ((= i (length token)) (push (make-char 'ascii c) out)) diff --git a/lisp/mail/rfc2047.el b/lisp/mail/rfc2047.el index 5ec9ddaba6b..78a49924b39 100644 --- a/lisp/mail/rfc2047.el +++ b/lisp/mail/rfc2047.el @@ -157,7 +157,7 @@ This is either `base64' or `quoted-printable'." (goto-char (point-min)) (skip-chars-forward "\x20-\x7f\r\n\t" limit) (while (< (point) limit) - (cl-incf n8bit) + (incf n8bit) (forward-char 1) (skip-chars-forward "\x20-\x7f\r\n\t" limit)) (if (or (< (* 6 n8bit) (- limit (point-min))) diff --git a/lisp/mail/rfc2231.el b/lisp/mail/rfc2231.el index 04527c78f8b..3426c909696 100644 --- a/lisp/mail/rfc2231.el +++ b/lisp/mail/rfc2231.el @@ -293,7 +293,7 @@ the result of this function." (insert param "*=") (while (not (eobp)) (insert (if (>= num 0) " " "") - param "*" (format "%d" (cl-incf num)) "*=") + param "*" (format "%d" (incf num)) "*=") (forward-line 1)))) (spacep (goto-char (point-min)) diff --git a/lisp/mail/yenc.el b/lisp/mail/yenc.el index 81cbab13b1f..ed7fb0fc6b2 100644 --- a/lisp/mail/yenc.el +++ b/lisp/mail/yenc.el @@ -97,14 +97,14 @@ (cond ((or (eq char ?\r) (eq char ?\n))) ((eq char ?=) - (setq char (char-after (cl-incf first))) + (setq char (char-after (incf first))) (with-current-buffer work-buffer (insert-char (mod (- char 106) 256) 1))) (t (with-current-buffer work-buffer ;;(insert-char (mod (- char 42) 256) 1) (insert-char (aref yenc-decoding-vector char) 1)))) - (cl-incf first)) + (incf first)) (setq bytes (buffer-size work-buffer)) (unless (and (= (cdr (assq 'size header-alist)) bytes) (= (cdr (assq 'size footer-alist)) bytes)) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index cdfed535d09..35723faf185 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -4817,7 +4817,7 @@ Return nil if there's no such element." (i 0)) (dolist (x pattern) (unless (stringp x) - (cl-incf i) + (incf i) (if (eq x 'point) (setq idx i)))) idx)) diff --git a/lisp/mpc.el b/lisp/mpc.el index 313131fac4e..e4f8159242a 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -630,7 +630,7 @@ The songs are returned as alists." (i 0)) (mapcar (lambda (s) (prog1 (cons (cons 'Pos (number-to-string i)) s) - (cl-incf i))) + (incf i))) l))) ((eq tag 'Search) (mpc-proc-buf-to-alists @@ -859,7 +859,7 @@ If PLAYLIST is t or nil or missing, use the main playlist." (if (< song-pos dest-pos) ;; This move has shifted dest-pos by 1. (decf dest-pos)) - (cl-incf i))) + (incf i))) ;; Sort them from last to first, so the renumbering ;; caused by the earlier deletions affect ;; later ones a bit less. @@ -1409,12 +1409,12 @@ string POST." (while (and (zerop (forward-line 1)) (get-char-property (point) 'mpc-select)) (setq end (1+ (point))) - (cl-incf after)) + (incf after)) (goto-char mid) (while (and (zerop (forward-line -1)) (get-char-property (point) 'mpc-select)) (setq start (point)) - (cl-incf before)) + (incf before)) (if (and (= after 0) (= before 0)) ;; Shortening an already minimum-size region: do nothing. nil @@ -1438,13 +1438,13 @@ string POST." (start (line-beginning-position))) (while (and (zerop (forward-line 1)) (not (get-char-property (point) 'mpc-select))) - (cl-incf count)) + (incf count)) (unless (get-char-property (point) 'mpc-select) (setq count nil)) (goto-char start) (while (and (zerop (forward-line -1)) (not (get-char-property (point) 'mpc-select))) - (cl-incf before)) + (incf before)) (unless (get-char-property (point) 'mpc-select) (setq before nil)) (when (and before (or (null count) (< before count))) @@ -2052,7 +2052,7 @@ This is used so that they can be compared with `eq', which is needed for (cdr (assq 'file song1)) (cdr (assq 'file song2))))) (and (integerp cmp) (< cmp 0))))))) - (cl-incf totaltime (string-to-number (or (cdr (assq 'Time song)) "0"))) + (incf totaltime (string-to-number (or (cdr (assq 'Time song)) "0"))) (mpc-format mpc-songs-format song) (delete-char (- (skip-chars-backward " "))) ;Remove trailing space. (insert "\n") @@ -2294,12 +2294,12 @@ This is used so that they can be compared with `eq', which is needed for (dolist (song (car context)) (and (zerop (forward-line -1)) (eq (get-text-property (point) 'mpc-file) song) - (cl-incf count))) + (incf count))) (goto-char pos) (dolist (song (cdr context)) (and (zerop (forward-line 1)) (eq (get-text-property (point) 'mpc-file) song) - (cl-incf count))) + (incf count))) count)) (defun mpc-songpointer-refresh-hairy () @@ -2340,7 +2340,7 @@ This is used so that they can be compared with `eq', which is needed for ((< score context-size) nil) (t ;; Score is equal and increasing context might help: try it. - (cl-incf context-size) + (incf context-size) (let ((new-context (mpc-songpointer-context context-size plbuf))) (if (null new-context) diff --git a/lisp/msb.el b/lisp/msb.el index 850b60ee1f0..5681ad0a63e 100644 --- a/lisp/msb.el +++ b/lisp/msb.el @@ -801,7 +801,7 @@ results in (defun msb--mode-menu-cond () (let ((key msb-modes-key)) (mapcar (lambda (item) - (cl-incf key) + (incf key) (list `( eq major-mode (quote ,(car item))) key (concat (cdr item) " (%d)"))) @@ -835,7 +835,7 @@ It takes the form ((TITLE . BUFFER-LIST)...)." buffer max-buffer-name-length) buffer)) - and do (cl-incf n) + and do (incf n) until (>= n msb-display-most-recently-used)))) (cons (if (stringp msb-most-recently-used-title) (format msb-most-recently-used-title @@ -1023,7 +1023,7 @@ variable `msb-menu-cond'." (tmp-list nil)) (while (< count msb-max-menu-items) (push (pop list) tmp-list) - (cl-incf count)) + (incf count)) (setq tmp-list (nreverse tmp-list)) (setq sub-name (concat (car (car tmp-list)) "...")) (push (nconc (list mcount sub-name @@ -1063,7 +1063,7 @@ variable `msb-menu-cond'." (cons (buffer-name (cdr item)) (cons (car item) 'msb--select-buffer))) (cdr sub-menu)))) - (nconc (list (cl-incf mcount) (car sub-menu) + (nconc (list (incf mcount) (car sub-menu) 'keymap (car sub-menu)) (msb--split-menus buffers)))))) raw-menu))) diff --git a/lisp/net/pop3.el b/lisp/net/pop3.el index a4de429311c..4d64cf153da 100644 --- a/lisp/net/pop3.el +++ b/lisp/net/pop3.el @@ -233,8 +233,8 @@ Use streaming commands." (setq start-point (pop3-wait-for-messages process pop3-stream-length total-size start-point)) - (cl-incf waited-for pop3-stream-length)) - (cl-incf i)) + (incf waited-for pop3-stream-length)) + (incf i)) (pop3-wait-for-messages process (- count waited-for) total-size start-point))) diff --git a/lisp/net/puny.el b/lisp/net/puny.el index 809e1832f07..456c0eefac3 100644 --- a/lisp/net/puny.el +++ b/lisp/net/puny.el @@ -114,7 +114,7 @@ For instance \"xn--bcher-kva\" => \"bücher\"." n m) (cl-loop for char across string when (< char n) - do (cl-incf delta) + do (incf delta) when (= char ijv) do (progn (setq q delta) @@ -137,8 +137,8 @@ For instance \"xn--bcher-kva\" => \"bücher\"." (setq bias (puny-adapt delta (+ h 1) (= h insertion-points)) delta 0 h (1+ h)))) - (cl-incf delta) - (cl-incf n)) + (incf delta) + (incf n)) (nreverse result))) (defun puny-decode-digit (cp) @@ -174,8 +174,8 @@ For instance \"xn--bcher-kva\" => \"bücher\"." digit t1) (cl-loop do (progn (setq digit (puny-decode-digit (aref encoded ic))) - (cl-incf ic) - (cl-incf i (* digit w)) + (incf ic) + (incf i (* digit w)) (setq t1 (cond ((<= k bias) puny-tmin) @@ -194,7 +194,7 @@ For instance \"xn--bcher-kva\" => \"bücher\"." (goto-char (point-min)) (forward-char i) (insert (format "%c" n)) - (cl-incf i))) + (incf i))) (buffer-string))) ;; https://www.unicode.org/reports/tr39/#Restriction_Level_Detection diff --git a/lisp/net/shr-color.el b/lisp/net/shr-color.el index 3f7b6f6df8f..bbb7bd6afaa 100644 --- a/lisp/net/shr-color.el +++ b/lisp/net/shr-color.el @@ -208,7 +208,7 @@ This will convert \"80 %\" to 204, \"100 %\" to 255 but \"123\" to \"123\"." (defun shr-color-hue-to-rgb (x y h) "Convert X Y H to RGB value." - (when (< h 0) (cl-incf h)) + (when (< h 0) (incf h)) (when (> h 1) (decf h)) (cond ((< h (/ 6.0)) (+ x (* (- y x) h 6))) ((< h 0.5) y) diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index 84c40895227..c4d816aa60a 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el @@ -1768,7 +1768,7 @@ This is a specialization of `soap-encode-value' for (let ((e-name (intern e-name))) (dolist (v value) (when (equal (car v) e-name) - (cl-incf instance-count) + (incf instance-count) (soap-encode-value (cdr v) candidate)))) (if (soap-xs-complex-type-indicator type) (let ((current-point (point))) @@ -1776,12 +1776,12 @@ This is a specialization of `soap-encode-value' for ;; characters were inserted in the buffer. (soap-encode-value value candidate) (when (not (equal current-point (point))) - (cl-incf instance-count))) + (incf instance-count))) (dolist (v value) (let ((current-point (point))) (soap-encode-value v candidate) (when (not (equal current-point (point))) - (cl-incf instance-count)))))))) + (incf instance-count)))))))) ;; Do some sanity checking (let* ((indicator (soap-xs-complex-type-indicator type)) (element-type (soap-xs-element-type element)) @@ -1997,7 +1997,7 @@ This is a specialization of `soap-decode-type' for (list node))) (element-type (soap-xs-element-type element))) (dolist (node children) - (cl-incf instance-count) + (incf instance-count) (let* ((attributes (soap-decode-xs-attributes element-type node)) ;; Attributes may specify xsi:type override. @@ -2316,7 +2316,7 @@ See also `soap-resolve-references' and (message (cdr input))) ;; Name this part if it was not named (when (or (null name) (equal name "")) - (setq name (format "in%d" (cl-incf counter)))) + (setq name (format "in%d" (incf counter)))) (when (soap-name-p message) (setf (soap-operation-input operation) (cons (intern name) @@ -2327,7 +2327,7 @@ See also `soap-resolve-references' and (let ((name (car output)) (message (cdr output))) (when (or (null name) (equal name "")) - (setq name (format "out%d" (cl-incf counter)))) + (setq name (format "out%d" (incf counter)))) (when (soap-name-p message) (setf (soap-operation-output operation) (cons (intern name) @@ -2339,7 +2339,7 @@ See also `soap-resolve-references' and (let ((name (car fault)) (message (cdr fault))) (when (or (null name) (equal name "")) - (setq name (format "fault%d" (cl-incf counter)))) + (setq name (format "fault%d" (incf counter)))) (if (soap-name-p message) (push (cons (intern name) (soap-wsdl-get message wsdl 'soap-message-p)) @@ -2425,19 +2425,19 @@ traverse an element tree." ;; If this namespace does not have an alias, create one for it. (catch 'done (while t - (setq nstag (format "ns%d" (cl-incf nstag-id))) + (setq nstag (format "ns%d" (incf nstag-id))) (unless (assoc nstag alias-table) (soap-wsdl-add-alias nstag (soap-namespace-name ns) wsdl) (throw 'done t))))) (maphash (lambda (_name element) (cond ((soap-element-p element) ; skip links - (cl-incf nprocessed) + (incf nprocessed) (soap-resolve-references element wsdl)) ((listp element) (dolist (e element) (when (soap-element-p e) - (cl-incf nprocessed) + (incf nprocessed) (soap-resolve-references e wsdl)))))) (soap-namespace-elements ns))))) wsdl) diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el index 31b398a4bc1..159ed29adba 100644 --- a/lisp/play/5x5.el +++ b/lisp/play/5x5.el @@ -335,7 +335,7 @@ Quit current game \\[5x5-quit-game]" (defun 5x5-made-move () "Keep track of how many moves have been made." - (cl-incf 5x5-moves)) + (incf 5x5-moves)) (defun 5x5-make-random-grid (&optional move) "Make a random grid." @@ -865,7 +865,7 @@ lest." "Move down." (interactive nil 5x5-mode) (unless (= 5x5-y-pos (1- 5x5-grid-size)) - (cl-incf 5x5-y-pos) + (incf 5x5-y-pos) (5x5-position-cursor))) (defun 5x5-left () @@ -879,7 +879,7 @@ lest." "Move right." (interactive nil 5x5-mode) (unless (= 5x5-x-pos (1- 5x5-grid-size)) - (cl-incf 5x5-x-pos) + (incf 5x5-x-pos) (5x5-position-cursor))) (defun 5x5-bol () diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el index dd3cad0b3a9..ae20a53d632 100644 --- a/lisp/play/decipher.el +++ b/lisp/play/decipher.el @@ -155,7 +155,7 @@ the tail of the list." (let ((key ?a)) (while (<= key ?z) (keymap-set decipher-mode-map (char-to-string key) #'decipher-keypress) - (cl-incf key))) + (incf key))) (defvar-keymap decipher-stats-mode-map :doc "Keymap for Decipher-Stats mode." @@ -170,7 +170,7 @@ the tail of the list." (c ?0)) (while (<= c ?9) (modify-syntax-entry c "_" table) ;Digits are not part of words - (cl-incf c)) + (incf c)) table) "Decipher mode syntax table.") @@ -373,7 +373,7 @@ The most useful commands are: (if undo-rec (progn (push undo-rec decipher-undo-list) - (cl-incf decipher-undo-list-size) + (incf decipher-undo-list-size) (if (> decipher-undo-list-size decipher-undo-limit) (let ((new-size (- decipher-undo-limit 100))) ;; Truncate undo list to NEW-SIZE elements: @@ -547,7 +547,7 @@ you have determined the keyword." (progn (while (rassoc cipher-char decipher-alphabet) ;; Find the next unused letter - (cl-incf cipher-char)) + (incf cipher-char)) (push (cons ?\s cipher-char) undo-rec) (decipher-set-map cipher-char (car plain-map) t)))) (decipher-add-undo undo-rec))) @@ -797,17 +797,17 @@ TOTAL is the total number of letters in the ciphertext." ;; A vector of 26 integers, counting the number of occurrences ;; of the corresponding characters. (setq decipher--digram (format "%c%c" decipher--prev-char decipher-char)) - (cl-incf (cdr (or (assoc decipher--digram decipher--digram-list) + (incf (cdr (or (assoc decipher--digram decipher--digram-list) (car (push (cons decipher--digram 0) decipher--digram-list))))) (and (>= decipher--prev-char ?A) - (cl-incf (aref (aref decipher--before (- decipher--prev-char ?A)) + (incf (aref (aref decipher--before (- decipher--prev-char ?A)) (if (equal decipher-char ?\s) 26 (- decipher-char ?A))))) (and (>= decipher-char ?A) - (cl-incf (aref decipher--freqs (- decipher-char ?A))) - (cl-incf (aref (aref decipher--after (- decipher-char ?A)) + (incf (aref decipher--freqs (- decipher-char ?A))) + (incf (aref (aref decipher--after (- decipher-char ?A)) (if (equal decipher--prev-char ?\s) 26 (- decipher--prev-char ?A))))) @@ -818,8 +818,8 @@ TOTAL is the total number of letters in the ciphertext." (let ((total 0)) (concat (mapconcat (lambda (x) - (cond ((> x 99) (cl-incf total) "XX") - ((> x 0) (cl-incf total) (format "%2d" x)) + (cond ((> x 99) (incf total) "XX") + ((> x 0) (incf total) (format "%2d" x)) (t " "))) counts "") @@ -835,7 +835,7 @@ TOTAL is the total number of letters in the ciphertext." (while (>= (decf i) 0) (if (or (> (aref before-count i) 0) (> (aref after-count i) 0)) - (cl-incf total))) + (incf total))) total)) (defun decipher-analyze-buffer () diff --git a/lisp/play/hanoi.el b/lisp/play/hanoi.el index 41e5de7c1f4..2b0a67105ef 100644 --- a/lisp/play/hanoi.el +++ b/lisp/play/hanoi.el @@ -337,7 +337,7 @@ BITS must be of length nrings. Start at START-TIME." ;; do one pole-to-pole move and update the ring and pole pairs. (defun hanoi-move-ring (ring from to start-time) - (cl-incf (car from) baseward-step) + (incf (car from) baseward-step) (decf (car to) baseward-step) (let* ;; We move flywards-steps steps up the pole to the fly row, ;; then fly fly-steps steps across the fly row, then go diff --git a/lisp/play/snake.el b/lisp/play/snake.el index c06e53047af..3a446db439c 100644 --- a/lisp/play/snake.el +++ b/lisp/play/snake.el @@ -269,8 +269,8 @@ and then start moving it leftwards.") (dotimes (_ snake-length) (gamegrid-set-cell x y snake-snake) (setq snake-positions (cons (vector x y) snake-positions)) - (cl-incf x snake-velocity-x) - (cl-incf y snake-velocity-y))) + (incf x snake-velocity-x) + (incf y snake-velocity-y))) (snake-update-score)) (defun snake-set-dot () @@ -296,8 +296,8 @@ Argument SNAKE-BUFFER is the name of the buffer." (= c snake-snake)) (snake-end-game) (cond ((= c snake-dot) - (cl-incf snake-length) - (cl-incf snake-score) + (incf snake-length) + (incf snake-score) (snake-update-score) (snake-set-dot)) (t diff --git a/lisp/profiler.el b/lisp/profiler.el index 57bd56af593..291bcb4a6b1 100644 --- a/lisp/profiler.el +++ b/lisp/profiler.el @@ -240,7 +240,7 @@ Optional argument MODE means only check for the specified mode (cpu or mem)." (defun profiler-calltree-depth (tree) (let ((d 0)) (while (setq tree (profiler-calltree-parent tree)) - (cl-incf d)) + (incf d)) d)) (defun profiler-calltree-find (tree entry) @@ -274,7 +274,7 @@ Optional argument MODE means only check for the specified mode (cpu or mem)." (setq child (profiler-make-calltree :entry entry :parent node)) (push child (profiler-calltree-children node))) - (cl-incf (profiler-calltree-count child) count) + (incf (profiler-calltree-count child) count) (setq node child))))))) log)) @@ -367,7 +367,7 @@ Optional argument MODE means only check for the specified mode (cpu or mem)." (push tmp parents) (setq tmp (cdr tmp))) (when (aref (cdar parents) (1- max)) - (cl-incf (profiler-calltree-count leftover-tree) count) + (incf (profiler-calltree-count leftover-tree) count) (setq node leftover-tree)) (pcase-dolist (`(,i . ,parent) parents) (let ((j (1- max))) @@ -380,7 +380,7 @@ Optional argument MODE means only check for the specified mode (cpu or mem)." (setq child (profiler-make-calltree :entry f :parent node)) (push child (profiler-calltree-children node))) - (cl-incf (profiler-calltree-count child) count) + (incf (profiler-calltree-count child) count) (setq node child))))))))) log))) @@ -388,7 +388,7 @@ Optional argument MODE means only check for the specified mode (cpu or mem)." (let ((total-count 0)) ;; FIXME: the memory profiler's total wraps around all too easily! (dolist (child (profiler-calltree-children tree)) - (cl-incf total-count (profiler-calltree-count child))) + (incf total-count (profiler-calltree-count child))) (unless (zerop total-count) (profiler-calltree-walk tree (lambda (node) diff --git a/lisp/registry.el b/lisp/registry.el index 520b8c1267e..3b489ea88b7 100644 --- a/lisp/registry.el +++ b/lisp/registry.el @@ -310,7 +310,7 @@ Errors out if the key exists already." (dolist (tr (oref db tracked)) (maphash (lambda (key v) - (cl-incf count) + (incf count) (when (and (< 0 expected) (= 0 (mod count 1000))) (message "reindexing: %d of %d (%.2f%%)" diff --git a/lisp/strokes.el b/lisp/strokes.el index b3fe4dcf4d0..d796c8d0c10 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el @@ -1560,7 +1560,7 @@ XPM-BUFFER defaults to \" *strokes-xpm*\"." ;; yet another of the same bit-type, so we continue ;; counting... (progn - (cl-incf count) + (incf count) (forward-char 1)) ;; otherwise, it's the opposite bit-type, so we do a ;; write and then restart count ### NOTE (for myself diff --git a/lisp/term.el b/lisp/term.el index 60933e04fb2..8516c7f7c0a 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -3106,7 +3106,7 @@ See `term-prompt-regexp'." (eq (char-charset (aref decoded-substring (- count 1 partial))) 'eight-bit)) - (cl-incf partial)) + (incf partial)) (when (> count partial 0) (setq term-terminal-undecoded-bytes (substring decoded-substring (- partial))) @@ -3483,7 +3483,7 @@ color is unset in the terminal state." (pcase (pop parameters) ;; 256 color (5 (if (setq term-ansi-current-color (pop parameters)) - (cl-incf term-ansi-current-color) + (incf term-ansi-current-color) (term-ansi-reset))) ;; Full 24-bit color (2 (cl-loop with color = (1+ 256) ; Base @@ -3513,7 +3513,7 @@ color is unset in the terminal state." (pcase (pop parameters) ;; 256 color (5 (if (setq term-ansi-current-bg-color (pop parameters)) - (cl-incf term-ansi-current-bg-color) + (incf term-ansi-current-bg-color) (term-ansi-reset))) ;; Full 24-bit color (2 (cl-loop with color = (1+ 256) ; Base diff --git a/lisp/treesit.el b/lisp/treesit.el index e90e2604208..386278ee3f0 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -426,7 +426,7 @@ If NAMED is non-nil, collect named child only." If NAMED is non-nil, count named child only." (let ((count 0)) (while (setq node (treesit-node-prev-sibling node named)) - (cl-incf count)) + (incf count)) count)) (defun treesit-node-field-name (node) @@ -2362,7 +2362,7 @@ Similar to `treesit-indent', but indent a region instead." (copy-marker anchor t))) ;; SET OFFSET. (setf (aref meta-vec (+ 1 (* idx meta-len))) offset)))) - (cl-incf idx) + (incf idx) (setq lines-left-to-move (forward-line 1))) ;; Now IDX = last valid IDX + 1. (goto-char starting-pos) diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index c4656c12e2d..c2cbdf131cd 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -112,7 +112,7 @@ i.e. 1970-1-1) are loaded as expiring one year from now instead." s)))) (key (nth 5 fields)) (val (nth 6 fields))) - (cl-incf n) + (incf n) ;;(message "adding <%s>=<%s> exp=<%s> dom=<%s> path=<%s> sec=%S" key val expires dom path secure) (url-cookie-store key val expires dom path secure) )) diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el index 21ed8c5ab05..1d617ceb874 100644 --- a/lisp/url/url-dav.el +++ b/lisp/url/url-dav.el @@ -865,7 +865,7 @@ Returns nil if URL contains no name starting with FILE." (setq failed t))) (if failed (setq searching nil) - (cl-incf n))) + (incf n))) (substring (car matches) 0 n)))))) (defun url-dav-register-handler (op) diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el index 48d2c7b0733..746648e0aa1 100644 --- a/lisp/url/url-queue.el +++ b/lisp/url/url-queue.el @@ -87,7 +87,7 @@ The variable `url-queue-timeout' sets a timeout." (cond ((or (url-queue-start-time entry) (url-queue-pre-triggered entry)) - (cl-incf running)) + (incf running)) ((not waiting) (setq waiting entry)))) (when (and waiting @@ -108,7 +108,7 @@ The variable `url-queue-timeout' sets a timeout." (dolist (entry url-queue) (cond ((url-queue-start-time entry) - (cl-incf running)) + (incf running)) ((not waiting) (setq waiting entry)))) (when (and waiting diff --git a/lisp/wdired.el b/lisp/wdired.el index 7bae26e9259..f46f0a62f02 100644 --- a/lisp/wdired.el +++ b/lisp/wdired.el @@ -528,7 +528,7 @@ non-nil means return old filename." (when files-renamed (pcase-let ((`(,errs . ,successful-renames) (wdired-do-renames files-renamed))) - (cl-incf errors errs) + (incf errors errs) ;; Some of the renames may fail -- in that case, don't mark an ;; already-existing file with the same name as renamed. (pcase-dolist (`(,file . _) wdired--old-marks) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index b73dfd3bcbb..ef9ea8c0845 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -1341,7 +1341,7 @@ nothing is shown in the echo area." (when new (if (eq new old) (setq pos (point)) - (cl-incf tabable) + (incf tabable) (setq arg (cond (fwd (1- arg)) (bwd (1+ arg)))) (setq old new)))))) diff --git a/lisp/window-tool-bar.el b/lisp/window-tool-bar.el index 96726960fea..b8f84bd2da7 100644 --- a/lisp/window-tool-bar.el +++ b/lisp/window-tool-bar.el @@ -234,10 +234,10 @@ This is for when you want more customizations than the command (propertize " " 'invisible t)))) (mem2 (memory-use-counts))) (cl-mapl (lambda (l-init l0 l1) - (cl-incf (car l-init) (- (car l1) (car l0)))) + (incf (car l-init) (- (car l1) (car l0)))) window-tool-bar--memory-use-delta-step1 mem0 mem1) (cl-mapl (lambda (l-init l1 l2) - (cl-incf (car l-init) (- (car l2) (car l1)))) + (incf (car l-init) (- (car l2) (car l1)))) window-tool-bar--memory-use-delta-step2 mem1 mem2) (setf window-tool-bar-string--cache @@ -251,8 +251,8 @@ This is for when you want more customizations than the command '(:box (line-width 1))) (propertize " " 'display '(space :width (1)))) result)) - (cl-incf window-tool-bar--refresh-done-count)) - (cl-incf window-tool-bar--refresh-skipped-count)) + (incf window-tool-bar--refresh-done-count)) + (incf window-tool-bar--refresh-skipped-count)) window-tool-bar-string--cache) diff --git a/lisp/winner.el b/lisp/winner.el index 4e279504c09..ab5b222eb26 100644 --- a/lisp/winner.el +++ b/lisp/winner.el @@ -381,7 +381,7 @@ In other words, \"undo\" changes in window configuration." (setq winner-pending-undo-ring (winner-ring (selected-frame))) (setq winner-undo-counter 0) (setq winner-undone-data (list (winner-win-data)))) - (cl-incf winner-undo-counter) ; starting at 1 + (incf winner-undo-counter) ; starting at 1 (when (and (winner-undo-this) (not (window-minibuffer-p))) (message "Winner undo (%d / %d)" diff --git a/lisp/xwidget.el b/lisp/xwidget.el index de05aae7f34..65378e2ef27 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el @@ -1090,7 +1090,7 @@ With argument, add COUNT copies of CHAR." (let ((i 0)) (while (< i count) (xwidget-webkit-next-result (xwidget-webkit-current-session)) - (cl-incf i))) + (incf i))) (xwidget-webkit-isearch--update t)) (defun xwidget-webkit-isearch-backward (count) @@ -1104,7 +1104,7 @@ With argument, add COUNT copies of CHAR." (let ((i 0)) (while (< i count) (xwidget-webkit-previous-result (xwidget-webkit-current-session)) - (cl-incf i))) + (incf i))) (xwidget-webkit-isearch--update t)) (defun xwidget-webkit-isearch-exit ()