* 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)
(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")
(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)))))
(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
(auth-source-specmatchp spec (cdr key)))
;; remove that key
(password-cache-remove key)
- (cl-incf count)))
+ (incf count)))
password-data)
count))
(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
(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)))
(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)
(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
(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)
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)
"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)
"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)))
(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
(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))
'(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)))))
(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)))))
(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)))))))
(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)))))
(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)
(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.
(cl-assert (and i end))
(while (< i end)
(iter-yield i)
- (cl-incf i))))
+ (incf i))))
((stringp arg)
(iter-yield arg))
((listp arg)
(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))
(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")
(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)))
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)))
;; 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))
;; (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)))
;; (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)))
(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)
(if (equal (car groups) group)
(setq found t
groups nil)
- (cl-incf res)
+ (incf res)
(setq groups (cdr groups))))
res)))
(cond ((not found)
(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...
;; 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
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.
(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)
(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)
(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)
;; 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)))))))
(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"
(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")
"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)
(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)
;; 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 ?\())))
(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))
b c out range)
(while (< i (length token))
(setq c (aref token i))
- (cl-incf i)
+ (incf i)
(cond
((eq c ?-)
(if b
(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))
(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)))
(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))
(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))
(i 0))
(dolist (x pattern)
(unless (stringp x)
- (cl-incf i)
+ (incf i)
(if (eq x 'point) (setq idx i))))
idx))
(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
(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.
(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
(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)))
(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")
(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 ()
((< 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)
(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)")))
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
(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
(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)))
(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)))
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)
(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)
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)
(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
(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)
(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)))
;; 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))
(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.
(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)
(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)
(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))
;; 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)
(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."
"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 ()
"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 ()
(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."
(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.")
(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:
(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)))
;; 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)))))
(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
"")
(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 ()
;; 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
(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 ()
(= 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
(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)
(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))
(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)))
(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)))
(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)
(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%%)"
;; 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
(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)))
(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
(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
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)
(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)
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)
))
(setq failed t)))
(if failed
(setq searching nil)
- (cl-incf n)))
+ (incf n)))
(substring (car matches) 0 n))))))
(defun url-dav-register-handler (op)
(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
(dolist (entry url-queue)
(cond
((url-queue-start-time entry)
- (cl-incf running))
+ (incf running))
((not waiting)
(setq waiting entry))))
(when (and waiting
(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)
(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))))))
(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
'(: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)
(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)"
(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)
(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 ()