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.
This commit is contained in:
Stefan Kangas 2025-02-23 02:55:14 +01:00
parent e60103f130
commit fa0131723c
59 changed files with 169 additions and 169 deletions

View file

@ -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")

View file

@ -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)))))

View file

@ -1692,7 +1692,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

View file

@ -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))

View file

@ -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

View file

@ -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)

View file

@ -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)))

View file

@ -144,8 +144,8 @@ Lays claim to all -by.el, and -wy.el files."
(src (ede-expand-filename obj fname))
;; (csrc (concat (file-name-sans-extension src) ".elc"))
)
(cl-incf (if (eq (byte-recompile-file src nil 0) t)
comp utd)))))
(incf (if (eq (byte-recompile-file src nil 0) t)
comp utd)))))
(oref obj source))
(message "All Semantic Grammar sources are up to date in %s" (eieio-object-name obj))
(cons comp utd)))

View file

@ -1996,7 +1996,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

View file

@ -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)

View file

@ -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.

View file

@ -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)

View file

@ -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,7 +366,7 @@ 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))
@ -374,7 +374,7 @@ is not shared with the original 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))))
(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)))

View file

@ -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))

View file

@ -958,7 +958,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)))
@ -971,7 +971,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)))

View file

@ -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)
@ -898,7 +898,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)

View file

@ -1119,7 +1119,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...
@ -1917,18 +1917,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

View file

@ -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.

View file

@ -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)

View file

@ -391,7 +391,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)

View file

@ -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"

View file

@ -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")

View file

@ -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)

View file

@ -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))

View file

@ -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))

View file

@ -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)))

View file

@ -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))

View file

@ -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))

View file

@ -463,7 +463,7 @@ all the strings have been used."
(push (buffer-substring-no-properties (point)
(line-end-position))
arg-list)
(cl-incf count)
(incf count)
(forward-line))
(apply #'call-process cmd nil (list out nil) nil
(nreverse arg-list))))

View file

@ -1472,7 +1472,7 @@ function doesn't recenter the folder buffer."
(let ((lines-from-end 2))
(save-excursion
(while (> (point-max) (progn (forward-line) (point)))
(cl-incf lines-from-end)))
(incf lines-from-end)))
(recenter (- lines-from-end))))
;; '(4) is the same as C-u prefix argument.
(t (recenter (or arg '(4))))))

View file

@ -750,7 +750,7 @@ buttons need to be displayed multiple times (for instance when
nested messages are opened)."
(or (gethash handle (mh-mime-part-index-hash (mh-buffer-data)))
(setf (gethash handle (mh-mime-part-index-hash (mh-buffer-data)))
(cl-incf (mh-mime-parts-count (mh-buffer-data))))))
(incf (mh-mime-parts-count (mh-buffer-data))))))
(defun mh-small-image-p (handle)
"Decide whether HANDLE is a \"small\" image that can be displayed inline.

View file

@ -287,7 +287,7 @@ folder containing the index search results."
"-sequence"
"cur" (format "%s" cur)))
(cl-loop for msg in msgs
do (cl-incf result-count)
do (incf result-count)
(setf (gethash result-count origin-map)
(cons folder msg)))))
folder-results-map)

View file

@ -248,7 +248,7 @@ sibling."
(beginning-of-line)
(forward-char address-start-offset)
(while (char-equal (char-after) ? )
(cl-incf level)
(incf level)
(forward-char))
level)))

View file

@ -579,9 +579,9 @@ This function is a testable helper of `mh-sub-folders-actual'."
(when (integerp has-pos)
(while (equal (char-after has-pos) ? )
(decf has-pos))
(cl-incf has-pos)
(incf has-pos)
(while (equal (char-after start-pos) ? )
(cl-incf start-pos))
(incf start-pos))
(let* ((name (buffer-substring start-pos has-pos))
(first-char (aref name 0))
(second-char (and (length> name 1) (aref name 1)))

View file

@ -1758,7 +1758,7 @@ KEYFUN takes an element of ELEMS and should return a numerical value."
(dolist (c hist)
(unless (gethash c hash)
(puthash c index hash))
(cl-incf index))
(incf index))
(minibuffer--sort-by-key
elems (lambda (x) (gethash x hash most-positive-fixnum)))))
@ -4068,7 +4068,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))

View file

@ -634,7 +634,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
@ -870,7 +870,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.
@ -1420,12 +1420,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
@ -1449,13 +1449,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)))
@ -2063,7 +2063,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")
@ -2305,12 +2305,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 ()
@ -2351,7 +2351,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)

View file

@ -803,7 +803,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)")))
@ -837,7 +837,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
@ -1025,7 +1025,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
@ -1065,7 +1065,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)))

View file

@ -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)))

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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 ()

View file

@ -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 ()

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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%%)"

View file

@ -10256,7 +10256,7 @@ The optional argument PT defaults to (point)."
(when (cond
((and (/= pt (point-max))
(get-text-property pt 'completion--string))
(cl-incf pt))
(incf pt))
((and (/= pt (point-min))
(get-text-property (1- pt) 'completion--string))))
(setq pt (or (previous-single-property-change pt 'completion--string) pt))

View file

@ -1561,7 +1561,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

View file

@ -3110,7 +3110,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)))
@ -3487,7 +3487,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
@ -3517,7 +3517,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

View file

@ -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)
@ -2367,7 +2367,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)

View file

@ -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)
))

View file

@ -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)

View file

@ -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

View file

@ -527,7 +527,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)

View file

@ -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))))))

View file

@ -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)

View file

@ -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)"

View file

@ -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 ()