From 48479ed4c839b61201afc53bc171750e96ea4616 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 23 Feb 2025 21:25:55 +0100 Subject: [PATCH] Prefer incf to cl-incf in gnus/*.el * lisp/gnus/gnus-agent.el (gnus-agent-load-local) (gnus-agent-expire-group-1, gnus-agent-update-files-total-fetched-for): * lisp/gnus/gnus-art.el (gnus-article-header-rank): * lisp/gnus/gnus-async.el (gnus-async-wait-for-article): * lisp/gnus/gnus-cache.el (gnus-cache-update-file-total-fetched-for): * lisp/gnus/gnus-registry.el (gnus-registry-import-eld): * lisp/gnus/gnus-salt.el (gnus-pick-line-number, gnus-tree-minimize) (gnus-generate-vertical-tree): * lisp/gnus/gnus-spec.el (gnus-correct-substring): * lisp/gnus/gnus-start.el (gnus-ask-server-for-new-groups, gnus-method-rank): * lisp/gnus/gnus-sum.el (gnus-data-update-list) (gnus-summary-number-of-articles-in-thread, gnus-build-sparse-threads) (gnus-summary-prepare-threads, gnus-invisible-cut-children) (gnus-summary-limit-children, gnus-expunge-thread) (gnus-summary-refer-references, gnus-summary-update-mark) (gnus-summary-hide-all-threads, gnus-summary-save-parts-1): * lisp/gnus/gnus-topic.el (gnus-topic-articles-in-topic) (gnus-topic-prepare-topic, gnus-topic-display-missing-topic) (gnus-topic-update-topic-line): * lisp/gnus/gnus-uu.el (gnus-uu-post-encoded): * lisp/gnus/gnus-win.el (gnus-configure-frame): * lisp/gnus/mail-source.el (mail-source-fetch-directory) (mail-source-fetch-maildir, mail-source-fetch-imap): * lisp/gnus/message.el (message-remove-header) (message-remove-first-header, message-make-caesar-translation-table): * lisp/gnus/mm-encode.el (mm-qp-or-base64): * lisp/gnus/mml.el (mml-compute-boundary, mml-compute-boundary-1): * lisp/gnus/nnatom.el (nnatom--read-links): * lisp/gnus/nnbabyl.el (nnbabyl-retrieve-headers): * lisp/gnus/nndoc.el (nndoc-oe-dbx-dissection, nndoc-dissect-buffer) (nndoc-dissect-mime-parts-sub): * lisp/gnus/nneething.el (nneething-retrieve-headers): * lisp/gnus/nnheader.el (nnheader-generate-fake-message-id) (nnheader-insert-head, nnheader-translate-file-chars): * lisp/gnus/nnimap.el (nnimap-find-wanted-parts-1) (nnimap-retrieve-group-data-early, nnimap-send-command): * lisp/gnus/nnmail.el (nnmail-process-babyl-mail-format) (nnmail-process-unix-mail-format, nnmail-process-mmdf-mail-format) (nnmail-get-new-mail-1): * lisp/gnus/nnmaildir.el (nnmaildir--scan): * lisp/gnus/nnrss.el (nnrss-check-group): * lisp/gnus/nnselect.el (nnselect-request-thread): * lisp/gnus/nnspool.el (nnspool-retrieve-headers): * lisp/gnus/nntp.el (nntp-retrieve-headers) (nntp-finish-retrieve-group-infos, nntp-retrieve-groups) (nntp-retrieve-articles, nntp-retrieve-headers-with-xover): * lisp/gnus/nnvirtual.el (nnvirtual-create-mapping): * lisp/gnus/nnweb.el (nnweb-google-parse-1, nnweb-google-create-mapping) (nnweb-gmane-create-mapping): * lisp/gnus/spam.el (spam-resolve-registrations-routine): Prefer incf to cl-incf. (cherry picked from commit ae8522af41bb67bf417b94ed54146a43fe2150ec) --- lisp/gnus/gnus-agent.el | 40 +++++++++--------- lisp/gnus/gnus-art.el | 2 +- lisp/gnus/gnus-async.el | 2 +- lisp/gnus/gnus-cache.el | 4 +- lisp/gnus/gnus-registry.el | 2 +- lisp/gnus/gnus-salt.el | 6 +-- lisp/gnus/gnus-spec.el | 8 ++-- lisp/gnus/gnus-start.el | 6 +-- lisp/gnus/gnus-sum.el | 22 +++++----- lisp/gnus/gnus-topic.el | 14 +++---- lisp/gnus/gnus-uu.el | 4 +- lisp/gnus/gnus-win.el | 4 +- lisp/gnus/mail-source.el | 6 +-- lisp/gnus/message.el | 6 +-- lisp/gnus/mm-encode.el | 2 +- lisp/gnus/mml.el | 4 +- lisp/gnus/nnatom.el | 84 +++++++++++++++++++------------------- lisp/gnus/nnbabyl.el | 2 +- lisp/gnus/nndoc.el | 8 ++-- lisp/gnus/nneething.el | 2 +- lisp/gnus/nnheader.el | 6 +-- lisp/gnus/nnimap.el | 6 +-- lisp/gnus/nnmail.el | 10 ++--- lisp/gnus/nnmaildir.el | 2 +- lisp/gnus/nnrss.el | 2 +- lisp/gnus/nnselect.el | 2 +- lisp/gnus/nnspool.el | 2 +- lisp/gnus/nntp.el | 16 ++++---- lisp/gnus/nnvirtual.el | 4 +- lisp/gnus/nnweb.el | 8 ++-- lisp/gnus/spam.el | 2 +- 31 files changed, 144 insertions(+), 144 deletions(-) diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 5c75209bfd8..327f0f69ebf 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -2165,7 +2165,7 @@ method's subscribed groups." 'gnus-agent-file-loading-local #'gnus-agent-read-and-cache-local)) (when gnus-agent-article-local-times - (cl-incf gnus-agent-article-local-times))) + (incf gnus-agent-article-local-times))) gnus-agent-article-local)) (defun gnus-agent-read-and-cache-local (file) @@ -3343,9 +3343,9 @@ missing NOV entry. Run gnus-agent-regenerate-group to restore it."))) article-number))) (size (float (file-attribute-size (file-attributes file-name))))) - (cl-incf bytes-freed size) - (cl-incf size-files-deleted size) - (cl-incf files-deleted) + (incf bytes-freed size) + (incf size-files-deleted size) + (incf files-deleted) (delete-file file-name)) (push "expired cached article" actions)) (setf (nth 1 entry) nil) @@ -3358,13 +3358,13 @@ missing NOV entry. Run gnus-agent-regenerate-group to restore it."))) marker (- marker position-offset))) - (cl-incf nov-entries-deleted) + (incf nov-entries-deleted) (let* ((from (line-beginning-position)) (to (progn (forward-line 1) (point))) (freed (- to from))) - (cl-incf bytes-freed freed) - (cl-incf position-offset freed) + (incf bytes-freed freed) + (incf position-offset freed) (delete-region from to))) ;; If considering all articles is set, I can only @@ -3421,9 +3421,9 @@ expiration tests failed." group article-number) (when (boundp 'gnus-agent-expire-stats) (let ((stats gnus-agent-expire-stats)) - (cl-incf (nth 2 stats) bytes-freed) - (cl-incf (nth 1 stats) files-deleted) - (cl-incf (nth 0 stats) nov-entries-deleted))) + (incf (nth 2 stats) bytes-freed) + (incf (nth 1 stats) files-deleted) + (incf (nth 0 stats) nov-entries-deleted))) (gnus-agent-update-files-total-fetched-for group (- size-files-deleted))))))) @@ -4076,25 +4076,25 @@ CLEAN is obsolete and ignored." (let ((sum 0.0) file) (while (setq file (pop delta)) - (cl-incf sum (float (or (file-attribute-size - (file-attributes - (nnheader-concat - path - (if (numberp file) - (number-to-string file) - file)))) - 0)))) + (incf sum (float (or (file-attribute-size + (file-attributes + (nnheader-concat + path + (if (numberp file) + (number-to-string file) + file)))) + 0)))) (setq delta sum)) (let ((sum (- (nth 2 entry))) (info (directory-files-and-attributes path nil "\\`-?[0-9]+\\'" t)) file) (while (setq file (pop info)) - (cl-incf sum (float (or (file-attribute-size (cdr file)) 0)))) + (incf sum (float (or (file-attribute-size (cdr file)) 0)))) (setq delta sum)))) (setq gnus-agent-need-update-total-fetched-for t) - (cl-incf (nth 2 entry) delta)))))) + (incf (nth 2 entry) delta)))))) (defun gnus-agent-update-view-total-fetched-for (group agent-over &optional method path) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 1761880c2ad..8bac9b8f48b 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -1839,7 +1839,7 @@ Initialized from `text-mode-syntax-table'.") (if (looking-at (car list)) (setq list nil) (setq list (cdr list)) - (cl-incf i))) + (incf i))) i)) (defun article-hide-headers (&optional _arg _delete) diff --git a/lisp/gnus/gnus-async.el b/lisp/gnus/gnus-async.el index 4410bed5c03..e2d59306d47 100644 --- a/lisp/gnus/gnus-async.el +++ b/lisp/gnus/gnus-async.el @@ -283,7 +283,7 @@ that was fetched." ;; should check time-since-last-output, which ;; needs to be done in nntp.el. (while (eq article gnus-async-current-prefetch-article) - (cl-incf tries) + (incf tries) (when (nntp-accept-process-output proc) (setq tries 0)) (when (and (not nntp-have-messaged) diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index 59c5d7bb891..ad86f1043b9 100644 --- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el @@ -833,11 +833,11 @@ supported." (while (setq file (pop files)) (setq attrs (file-attributes file)) (unless (file-attribute-type attrs) - (cl-incf size (float (file-attribute-size attrs))))))) + (incf size (float (file-attribute-size attrs))))))) (setq gnus-cache-need-update-total-fetched-for t) - (cl-incf (nth 1 entry) (if subtract (- size) size)))))) + (incf (nth 1 entry) (if subtract (- size) size)))))) (defun gnus-cache-update-overview-total-fetched-for (group file) (when gnus-cache-total-fetched-hashtb diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 0d7282d73da..ba604af5d12 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -1142,7 +1142,7 @@ non-nil." (expected (length old)) entry) (while (car-safe old) - (cl-incf count) + (incf count) ;; todo: use progress reporters. (when (and (< 0 expected) (= 0 (mod count 100))) diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index f6f62de3b37..e1d9f8bf188 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -128,7 +128,7 @@ It accepts the same format specs that `gnus-summary-line-format' does." (defvar gnus-pick-line-number 1) (defun gnus-pick-line-number () "Return the current line number." - (cl-incf gnus-pick-line-number)) + (incf gnus-pick-line-number)) (defun gnus-pick-start-reading (&optional catch-up) "Start reading the picked articles. @@ -533,7 +533,7 @@ Two predefined functions are available: (not (one-window-p))) (let ((windows 0) tot-win-height) - (walk-windows (lambda (_window) (cl-incf windows))) + (walk-windows (lambda (_window) (incf windows))) (setq tot-win-height (- (frame-height) (* window-min-height (1- windows)) @@ -765,7 +765,7 @@ it in the environment specified by BINDINGS." (progn (goto-char (point-min)) (end-of-line) - (cl-incf gnus-tmp-indent)) + (incf gnus-tmp-indent)) ;; Recurse downwards in all children of this article. (while thread (gnus-generate-vertical-tree diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el index 1fa4db48fb4..2d7f1bbbe23 100644 --- a/lisp/gnus/gnus-spec.el +++ b/lisp/gnus/gnus-spec.el @@ -283,15 +283,15 @@ Return a list of updated types." ;; Find the start position. (while (and (< seek length) (< wseek start)) - (cl-incf wseek (char-width (aref string seek))) - (cl-incf seek)) + (incf wseek (char-width (aref string seek))) + (incf seek)) (setq wstart seek) ;; Find the end position. (while (and (<= seek length) (or (not end) (<= wseek end))) - (cl-incf wseek (char-width (aref string seek))) - (cl-incf seek)) + (incf wseek (char-width (aref string seek))) + (incf seek)) (setq wend seek) (substring string wstart (1- wend)))) diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 221e97cd4e6..d167a7c4dd6 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -1205,14 +1205,14 @@ for new groups, and subscribe the new groups as zombies." (let ((do-sub (gnus-matches-options-n g-name))) (cond ((eq do-sub 'subscribe) - (cl-incf groups) + (incf groups) (puthash g-name nil gnus-killed-hashtb) ;; group (gnus-call-subscribe-functions gnus-subscribe-options-newsgroup-method g-name)) ((eq do-sub 'ignore) nil) (t - (cl-incf groups) + (incf groups) (puthash g-name nil gnus-killed-hashtb) ;; group (if gnus-subscribe-hierarchical-interactive (push g-name new-newsgroups) @@ -1765,7 +1765,7 @@ backend check whether the group actually exists." (cl-dolist (smethod gnus-secondary-select-methods) (when (equal method smethod) (cl-return i)) - (cl-incf i)) + (incf i)) i))) ;; Just say that all foreign groups have the same rank. (t diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 81ae7eeb61b..393a8393b80 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -3213,7 +3213,7 @@ The following commands are available: "Add OFFSET to the POS of all data entries in DATA." (setq gnus-newsgroup-data-reverse nil) (while data - (cl-incf (gnus-data-pos (car data)) offset) + (incf (gnus-data-pos (car data)) offset) (setq data (cdr data)))) (defun gnus-summary-article-pseudo-p (article) @@ -3840,7 +3840,7 @@ the thread are to be displayed." 1) (t 0)))) (when (and level (zerop level) gnus-tmp-new-adopts) - (cl-incf number + (incf number (apply #'+ (mapcar #'gnus-summary-number-of-articles-in-thread gnus-tmp-new-adopts)))) @@ -4457,7 +4457,7 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (setq end (1+ (point))) (when (search-backward "<" nil t) (setq new-child (buffer-substring (point) end)) - (push (list (cl-incf generation) + (push (list (incf generation) child (setq child new-child) subject date) relations))) @@ -5502,7 +5502,7 @@ or a straight list of headers." (nthcdr 1 thread)) stack)) (push (if (nth 1 thread) 1 0) tree-stack) - (cl-incf gnus-tmp-level) + (incf gnus-tmp-level) (setq threads (if thread-end nil (cdar thread))) (if gnus-summary-display-while-building (if building-count @@ -8755,7 +8755,7 @@ If ALL, mark even excluded ticked and dormants as read." (let ((num 0)) (while threads (when (memq (mail-header-number (caar threads)) gnus-newsgroup-limit) - (cl-incf num)) + (incf num)) (pop threads)) (< num 2))) @@ -8887,7 +8887,7 @@ fetch-old-headers verbiage, and so on." gnus-summary-expunge-below)) ;; We increase the expunge-tally here, but that has ;; nothing to do with the limits, really. - (cl-incf gnus-newsgroup-expunged-tally) + (incf gnus-newsgroup-expunged-tally) ;; We also mark as read here, if that's wanted. (when (and gnus-summary-mark-below (< score gnus-summary-mark-below)) @@ -8912,7 +8912,7 @@ fetch-old-headers verbiage, and so on." (defun gnus-expunge-thread (thread) "Mark all articles in THREAD as read." (let* ((number (mail-header-number (car thread)))) - (cl-incf gnus-newsgroup-expunged-tally) + (incf gnus-newsgroup-expunged-tally) ;; We also mark as read here, if that's wanted. (setq gnus-newsgroup-unreads (delq number gnus-newsgroup-unreads)) @@ -8982,7 +8982,7 @@ Return the number of articles fetched." (error "No References in the current article") ;; For each Message-ID in the References header... (while (string-match "<[^>]*>" ref) - (cl-incf n) + (incf n) ;; ... fetch that article. (gnus-summary-refer-article (prog1 (match-string 0 ref) @@ -11246,7 +11246,7 @@ If NO-EXPIRE, auto-expiry will be inhibited." (re-search-backward "[\n\r]" (line-beginning-position) 'move-to-limit) (when forward (when (looking-at "\r") - (cl-incf forward)) + (incf forward)) (when (<= (+ forward (point)) (point-max)) ;; Go to the right position on the line. (goto-char (+ forward (point))) @@ -11825,7 +11825,7 @@ will not be hidden." (let ((end nil) (count 0)) (while (not end) - (cl-incf count) + (incf count) (when (zerop (mod count 1000)) (message "Hiding all threads... %d" count)) (when (or (not predicate) @@ -12498,7 +12498,7 @@ If REVERSE, save parts that do not match TYPE." (cdr gnus-article-current) gnus-summary-save-parts-counter)))) dir))) - (cl-incf gnus-summary-save-parts-counter) + (incf gnus-summary-save-parts-counter) (unless (file-exists-p file) (mm-save-part-to-file handle file)))))) diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index 777dc67b25b..971cf221541 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el @@ -135,7 +135,7 @@ should return non-nil if the topic is to be displayed." number) (while entries (when (numberp (setq number (car (pop entries)))) - (cl-incf total number))) + (incf total number))) total)) (defun gnus-group-topic (group) @@ -520,7 +520,7 @@ articles in the topic and its subtopics." 0 ;; Insert any sub-topics. (while topicl - (cl-incf unread + (incf unread (gnus-topic-prepare-topic (pop topicl) (1+ level) list-level predicate (not visiblep) lowest regexp))) @@ -574,7 +574,7 @@ articles in the topic and its subtopics." (car entry) (gnus-info-method info))))) (when (and (listp entry) (numberp (car entry))) - (cl-incf unread (car entry))) + (incf unread (car entry))) (when (listp entry) (setq tick t)))) (goto-char beg) @@ -752,10 +752,10 @@ articles in the topic and its subtopics." (cdr gnus-group-list-mode) nil t)) entry) (while children - (cl-incf unread (gnus-topic-unread (caar (pop children))))) + (incf unread (gnus-topic-unread (caar (pop children))))) (while (setq entry (pop entries)) (when (numberp (car entry)) - (cl-incf unread (car entry)))) + (incf unread (car entry)))) (gnus-topic-insert-topic-line topic t t (car (gnus-topic-find-topology topic)) nil unread all-groups))) @@ -799,10 +799,10 @@ articles in the topic and its subtopics." (if reads (setq unread (- (gnus-group-topic-unread) reads)) (while children - (cl-incf unread (gnus-topic-unread (caar (pop children))))) + (incf unread (gnus-topic-unread (caar (pop children))))) (while (setq entry (pop entries)) (when (numberp (car entry)) - (cl-incf unread (car entry))))) + (incf unread (car entry))))) (setq old-unread (gnus-group-topic-unread)) ;; Insert the topic line. (gnus-topic-insert-topic-line diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el index bf745be0f6e..50739ef5efa 100644 --- a/lisp/gnus/gnus-uu.el +++ b/lisp/gnus/gnus-uu.el @@ -2058,7 +2058,7 @@ If no file has been included, the user will be asked for a file." (setq length (count-lines (point-min) (point-max))) (setq parts (/ length gnus-uu-post-length)) (unless (< (% length gnus-uu-post-length) 4) - (cl-incf parts))) + (incf parts))) (when gnus-uu-post-separate-description (forward-line -1)) @@ -2117,7 +2117,7 @@ If no file has been included, the user will be asked for a file." (insert-buffer-substring uubuf beg end) (insert beg-line "\n") (setq beg end) - (cl-incf i) + (incf i) (goto-char (point-min)) (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$") nil t) diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el index 8acda65ba0e..b008475f191 100644 --- a/lisp/gnus/gnus-win.el +++ b/lisp/gnus/gnus-win.el @@ -311,7 +311,7 @@ See the Gnus manual for an explanation of the syntax used.") ;; Select the frame in question and do more splits there. (select-frame frame) (setq fresult (or (gnus-configure-frame (elt subs i)) fresult)) - (cl-incf i)) + (incf i)) ;; Select the frame that has the selected buffer. (when fresult (select-frame (window-frame fresult))))) @@ -343,7 +343,7 @@ See the Gnus manual for an explanation of the syntax used.") ((eq type 'vertical) (setq s (max s window-min-height)))) (setcar (cdar comp-subs) s) - (cl-incf total s))) + (incf total s))) ;; Take care of the "1.0" spec. (if rest (setcar (cdr rest) (- len total)) diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index eece03a62bc..954dce92e84 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el @@ -773,7 +773,7 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile) (when (and (file-regular-p file) (funcall predicate file) (mail-source-movemail file mail-source-crash-box)) - (cl-incf found (mail-source-callback callback file)) + (incf found (mail-source-callback callback file)) (mail-source-run-script postscript `((?t . ,path))) (mail-source-delete-crash-box))) found))) @@ -1029,7 +1029,7 @@ This only works when `display-time' is enabled." (insert "\001\001\001\001\n")) (delete-file file) nil)))) - (cl-incf found (mail-source-callback callback file)) + (incf found (mail-source-callback callback file)) (mail-source-delete-crash-box))))) found))) @@ -1104,7 +1104,7 @@ This only works when `display-time' is enabled." (replace-match ">From ")) (goto-char (point-max)))) (nnheader-ms-strip-cr)) - (cl-incf found (mail-source-callback callback server)) + (incf found (mail-source-callback callback server)) (mail-source-delete-crash-box) (when (and remove fetchflag) (setq remove (nreverse remove)) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 369b8c68aad..cd5cffeb453 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -2635,7 +2635,7 @@ Return the number of headers removed." (looking-at "[!-9;-~]+:")) (looking-at regexp)) (progn - (cl-incf number) + (incf number) (when first (setq last t)) (delete-region @@ -2660,7 +2660,7 @@ Return the number of headers removed." (save-excursion (goto-char (point-min)) (while (re-search-forward regexp nil t) - (cl-incf count))) + (incf count))) (while (> count 1) (message-remove-header header nil t) (decf count)))) @@ -3871,7 +3871,7 @@ text was killed." "Create a rot table with offset N." (let ((i -1) (table (make-string 256 0))) - (while (< (cl-incf i) 256) + (while (< (incf i) 256) (aset table i i)) (concat (substring table 0 ?A) diff --git a/lisp/gnus/mm-encode.el b/lisp/gnus/mm-encode.el index 863bad4db80..2ac336e800f 100644 --- a/lisp/gnus/mm-encode.el +++ b/lisp/gnus/mm-encode.el @@ -207,7 +207,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/gnus/mml.el b/lisp/gnus/mml.el index 51d8d2c3769..874fb4118d8 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -850,7 +850,7 @@ type detected." (defun mml-compute-boundary (cont) "Return a unique boundary that does not exist in CONT." (let ((mml-boundary (funcall mml-boundary-function - (cl-incf mml-multipart-number)))) + (incf mml-multipart-number)))) (unless mml-inhibit-compute-boundary ;; This function tries again and again until it has found ;; a unique boundary. @@ -870,7 +870,7 @@ type detected." (when (re-search-forward (concat "^--" (regexp-quote mml-boundary)) nil t) (setq mml-boundary (funcall mml-boundary-function - (cl-incf mml-multipart-number))) + (incf mml-multipart-number))) (throw 'not-unique nil)))) ((eq (car cont) 'multipart) (mapc #'mml-compute-boundary-1 (cddr cont)))) diff --git a/lisp/gnus/nnatom.el b/lisp/gnus/nnatom.el index 7375312b099..b4a37b45885 100644 --- a/lisp/gnus/nnatom.el +++ b/lisp/gnus/nnatom.el @@ -180,54 +180,54 @@ return the subject. Otherwise, return nil." (lambda (link) (when-let ((l (car-safe link))) (or - (when-let (((eq l 'content)) - (src (dom-attr link 'src)) - (label (concat "Link" - (and (< 1 (cl-incf alt)) - (format " %s" alt))))) + (when-let* (((eq l 'content)) + (src (dom-attr link 'src)) + (label (concat "Link" + (and (< 1 (incf alt)) + (format " %s" alt))))) `(((("text/plain") . ,(format "%s: %s\n" label src)) (("text/html") . ,(format "[%s] " src label))))) - (when-let (((or (eq l 'author) (eq l 'contributor))) - (name (nnatom--dom-line (dom-child-by-tag link 'name))) - (name (if (string-blank-p name) - (concat "Author" - (and (< 1 (cl-incf aut)) - (format " %s" aut))) - name)) - (uri (nnatom--dom-line (dom-child-by-tag link 'uri))) - ((not (string-blank-p uri)))) + (when-let* (((or (eq l 'author) (eq l 'contributor))) + (name (nnatom--dom-line (dom-child-by-tag link 'name))) + (name (if (string-blank-p name) + (concat "Author" + (and (< 1 (incf aut)) + (format " %s" aut))) + name)) + (uri (nnatom--dom-line (dom-child-by-tag link 'uri))) + ((not (string-blank-p uri)))) `(((("text/plain") . ,(format "%s: %s\n" name uri)) (("text/html") . ,(format "[%s] " uri name))))) - (when-let (((eq l 'link)) - (attrs (dom-attributes link)) - (label (or (cdr (assq 'title attrs)) - (pcase (cdr (assq 'rel attrs)) - ("related" - (concat "Related" - (and (< 1 (cl-incf rel)) - (format " %s" rel)))) - ("self" - (concat "More" - (and (< 1 (cl-incf sel)) - (format " %s" sel)))) - ("enclosure" - (concat "Enclosure" - (and (< 1 (cl-incf enc)) - (format " %s" enc)))) - ("via" - (concat "Source" - (and (< 1 (cl-incf via)) - (format " %s" via)))) - (_ (if-let - ((lang (cdr (assq 'hreflang link)))) - (format "Link (%s)" lang) - (concat - "Link" - (and (< 1 (cl-incf alt)) - (format " %s" alt)))))))) - (link (cdr (assq 'href attrs)))) + (when-let* (((eq l 'link)) + (attrs (dom-attributes link)) + (label (or (cdr (assq 'title attrs)) + (pcase (cdr (assq 'rel attrs)) + ("related" + (concat "Related" + (and (< 1 (incf rel)) + (format " %s" rel)))) + ("self" + (concat "More" + (and (< 1 (incf sel)) + (format " %s" sel)))) + ("enclosure" + (concat "Enclosure" + (and (< 1 (incf enc)) + (format " %s" enc)))) + ("via" + (concat "Source" + (and (< 1 (incf via)) + (format " %s" via)))) + (_ (if-let* + ((lang (cdr (assq 'hreflang link)))) + (format "Link (%s)" lang) + (concat + "Link" + (and (< 1 (incf alt)) + (format " %s" alt)))))))) + (link (cdr (assq 'href attrs)))) `(((("text/plain") . ,(format "%s: %s\n" label link)) (("text/html") . ,(format "[%s] " link label)))))))) diff --git a/lisp/gnus/nnbabyl.el b/lisp/gnus/nnbabyl.el index b5e364b0b4b..be58fac1a8c 100644 --- a/lisp/gnus/nnbabyl.el +++ b/lisp/gnus/nnbabyl.el @@ -101,7 +101,7 @@ (insert ".\n")) (and (numberp nnmail-large-newsgroup) (> number nnmail-large-newsgroup) - (zerop (% (cl-incf count) 20)) + (zerop (% (incf count) 20)) (nnheader-message 5 "nnbabyl: Receiving headers... %d%%" (floor (* count 100.0) number)))) diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el index 9647b4dcc17..a430d17caa2 100644 --- a/lisp/gnus/nndoc.el +++ b/lisp/gnus/nndoc.el @@ -786,7 +786,7 @@ from the document.") (setq blk (nndoc-oe-dbx-decode-block))) (while (and blk (> (car blk) 0) (or (zerop (nth 3 blk)) (> (nth 3 blk) p))) - (push (list (cl-incf i) p nil nil nil 0) nndoc-dissection-alist) + (push (list (incf i) p nil nil nil 0) nndoc-dissection-alist) (while (and (> (car blk) 0) (> (nth 3 blk) p)) (goto-char (1+ (nth 3 blk))) (setq blk (nndoc-oe-dbx-decode-block))) @@ -925,7 +925,7 @@ from the document.") (and (re-search-backward nndoc-file-end nil t) (beginning-of-line))))) (setq body-end (point)) - (push (list (cl-incf i) head-begin head-end body-begin body-end + (push (list (incf i) head-begin head-end body-begin body-end (count-lines body-begin body-end)) nndoc-dissection-alist))))) (setq nndoc-dissection-alist (nreverse nndoc-dissection-alist)))) @@ -1038,7 +1038,7 @@ PARENT is the message-ID of the parent summary line, or nil for none." (replace-match line t t summary-insert) (concat summary-insert line))))) ;; Generate dissection information for this entity. - (push (list (cl-incf nndoc-mime-split-ordinal) + (push (list (incf nndoc-mime-split-ordinal) head-begin head-end body-begin body-end (count-lines body-begin body-end) article-insert summary-insert) @@ -1076,7 +1076,7 @@ PARENT is the message-ID of the parent summary line, or nil for none." part-begin part-end article-insert (concat position (and position ".") - (format "%d" (cl-incf part-counter))) + (format "%d" (incf part-counter))) message-id))))))))) ;;;###autoload diff --git a/lisp/gnus/nneething.el b/lisp/gnus/nneething.el index 1123dcb7455..f3a320ab987 100644 --- a/lisp/gnus/nneething.el +++ b/lisp/gnus/nneething.el @@ -102,7 +102,7 @@ included.") (nneething-insert-head file) (insert ".\n")) - (cl-incf count) + (incf count) (and large (zerop (% count 20)) diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index b1758bd058f..ffa7be8d2ad 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -173,7 +173,7 @@ on your system, you could say something like: (format "fake+none+%s+%d" gnus-newsgroup-name number) (format "fake+none+%s+%s" gnus-newsgroup-name - (int-to-string (cl-incf nnheader-fake-message-id))))) + (int-to-string (incf nnheader-fake-message-id))))) (defsubst nnheader-fake-message-id-p (id) (save-match-data ; regular message-id's are <.*> @@ -601,7 +601,7 @@ the line could be found." (while (and (eq nnheader-head-chop-length (nth 1 (mm-insert-file-contents file nil beg - (cl-incf beg nnheader-head-chop-length)))) + (incf beg nnheader-head-chop-length)))) ;; CRLF or CR might be used for the line-break code. (prog1 (not (re-search-forward "\n\r?\n\\|\r\r" nil t)) (goto-char (point-max))) @@ -773,7 +773,7 @@ If FULL, translate everything." (when (setq trans (cdr (assq (aref leaf i) nnheader-file-name-translation-alist))) (aset leaf i trans)) - (cl-incf i)) + (incf i)) (concat path leaf)))) (defun nnheader-report (backend &rest args) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 4965e66503a..30f0a4b6a62 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -894,7 +894,7 @@ during splitting, which may be slow." (equal id "1") (string-match nnimap-fetch-partial-articles type)) (push id parts)))) - (cl-incf num))) + (incf num))) (nreverse parts))) (deffoo nnimap-request-group (group &optional server dont-check info) @@ -1521,7 +1521,7 @@ If LIMIT, first try to limit the search to the N last articles." (if (and active uidvalidity unexist) ;; Fetch the last 100 flags. (setq start (max 1 (- (cdr active) 100))) - (cl-incf (nnimap-initial-resync nnimap-object)) + (incf (nnimap-initial-resync nnimap-object)) (setq start 1)) (push (list (nnimap-send-command "%s %S" command (nnimap-group-to-imap group)) @@ -1964,7 +1964,7 @@ Return the server's response to the SELECT or EXAMINE command." (get-buffer-process (current-buffer)) (nnimap-log-command (format "%d %s%s\n" - (cl-incf nnimap-sequence) + (incf nnimap-sequence) (apply #'format args) (if (nnimap-newlinep nnimap-object) "" diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index e580d7aebba..8b6dd1cc6b3 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -790,7 +790,7 @@ If SOURCE is a directory spec, try to return the group name component." (narrow-to-region start (point)) (goto-char (point-min)) (nnmail-check-duplication message-id func artnum-func) - (cl-incf count) + (incf count) (setq end (point-max)))) (goto-char end)) count)) @@ -936,7 +936,7 @@ If SOURCE is a directory spec, try to return the group name component." (save-restriction (narrow-to-region start (point)) (goto-char (point-min)) - (cl-incf count) + (incf count) (nnmail-check-duplication message-id func artnum-func) (setq end (point-max)))) (goto-char end))) @@ -989,7 +989,7 @@ If SOURCE is a directory spec, try to return the group name component." (save-restriction (narrow-to-region start (point)) (goto-char (point-min)) - (cl-incf count) + (incf count) (nnmail-check-duplication message-id func artnum-func junk-func) (setq end (point-max)))) (goto-char end) @@ -1848,8 +1848,8 @@ be called once per group or once for all groups." ((error quit) (message "Mail source %s failed: %s" source cond) 0))) - (cl-incf total new) - (cl-incf i))) + (incf total new) + (incf i))) ;; If we did indeed read any incoming spools, we save all info. (if (zerop total) (when mail-source-plugged diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index 7f40b46f38d..4f528bac95e 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -839,7 +839,7 @@ This variable is set by `nnmaildir-request-article'.") ;; then look in marks directories (not (file-exists-p (concat cdir prefix))) (file-exists-p (concat ndir prefix))) - (cl-incf num))))) + (incf num))))) (setf (nnmaildir--grp-cache group) (make-vector num nil)) (let ((inhibit-quit t)) (puthash gname group groups)) diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index a494daeaa97..e166fa8424f 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el @@ -682,7 +682,7 @@ which RSS 2.0 allows." (setq enclosure (list url name len type)))) (push (list - (cl-incf nnrss-group-max) + (incf nnrss-group-max) (current-time) url (and subject (nnrss-mime-encode-string subject)) diff --git a/lisp/gnus/nnselect.el b/lisp/gnus/nnselect.el index e4792771b3a..91cff32fada 100644 --- a/lisp/gnus/nnselect.el +++ b/lisp/gnus/nnselect.el @@ -736,7 +736,7 @@ group info." (push (1+ seq) old-arts) (setq gnus-newsgroup-selection (vconcat gnus-newsgroup-selection (vector article))) - (cl-incf last))) + (incf last))) (gnus-search-run-query (list (cons 'search-query-spec query-spec) (cons 'search-group-spec group-spec)))) diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el index 3e6e7382994..4a9e1314a51 100644 --- a/lisp/gnus/nnspool.el +++ b/lisp/gnus/nnspool.el @@ -171,7 +171,7 @@ there.") (delete-region (point) (point-max))) (and do-message - (zerop (% (cl-incf count) 20)) + (zerop (% (incf count) 20)) (nnheader-message 5 "nnspool: Receiving headers... %d%%" (floor (* count 100.0) number)))) diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index a086421b049..cc68291868c 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -682,7 +682,7 @@ command whose response triggered the error." ;; `articles' is either a list of article numbers ;; or a list of article IDs. article)) - (cl-incf count) + (incf count) ;; Every 400 requests we have to read the stream in ;; order to avoid deadlocks. (when (or (null articles) ;All requests have been sent. @@ -694,7 +694,7 @@ command whose response triggered the error." ;; Count replies. (while (nntp-next-result-arrived-p) (setq last-point (point)) - (cl-incf received)) + (incf received)) (< received count)) ;; If number of headers is greater than 100, give ;; informative messages. @@ -767,7 +767,7 @@ command whose response triggered the error." "^[.]" "^[0-9]") nil t) - (cl-incf received)) + (incf received)) (setq last-point (point)) (< received count))) (nntp-accept-response)) @@ -832,7 +832,7 @@ command whose response triggered the error." (throw 'done nil)) ;; Send the command to the server. (nntp-send-command nil command (pop groups)) - (cl-incf count) + (incf count) ;; Every 400 requests we have to read the stream in ;; order to avoid deadlocks. (when (or (null groups) ;All requests have been sent. @@ -846,7 +846,7 @@ command whose response triggered the error." (goto-char last-point) ;; Count replies. (while (re-search-forward "^[0-9]" nil t) - (cl-incf received)) + (incf received)) (setq last-point (point)) (< received count))) (nntp-accept-response)))) @@ -918,7 +918,7 @@ command whose response triggered the error." ;; `articles' is either a list of article numbers ;; or a list of article IDs. article)) - (cl-incf count) + (incf count) ;; Every 400 requests we have to read the stream in ;; order to avoid deadlocks. (when (or (null articles) ;All requests have been sent. @@ -931,7 +931,7 @@ command whose response triggered the error." (while (nntp-next-result-arrived-p) (aset map received (cons (aref map received) (point))) (setq last-point (point)) - (cl-incf received)) + (incf received)) (< received count)) ;; If number of headers is greater than 100, give ;; informative messages. @@ -1544,7 +1544,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the ;; Count replies. (while (re-search-forward "^\\([0-9][0-9][0-9]\\) .*\n" nil t) - (cl-incf received) + (incf received) (setq status (match-string 1)) (if (string-match "^[45]" status) (setq status 'error) diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el index f2cbdd85652..c45c8d756e2 100644 --- a/lisp/gnus/nnvirtual.el +++ b/lisp/gnus/nnvirtual.el @@ -778,13 +778,13 @@ based on the marks on the component groups." ;; We need to convert the unreads to reads. We compress the ;; sequence as we go, otherwise it could be huge. - (while (and (<= (cl-incf i) nnvirtual-mapping-len) + (while (and (<= (incf i) nnvirtual-mapping-len) unreads) (if (= i (car unreads)) (setq unreads (cdr unreads)) ;; try to get a range. (setq beg i) - (while (and (<= (cl-incf i) nnvirtual-mapping-len) + (while (and (<= (incf i) nnvirtual-mapping-len) (not (= i (car unreads))))) (setq i (- i 1)) (if (= i beg) diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el index 9ada2dbc1d7..db460181d20 100644 --- a/lisp/gnus/nnweb.el +++ b/lisp/gnus/nnweb.el @@ -357,11 +357,11 @@ The only valid type is currently `google'.") (current-time-string))) (setq From (match-string 4))) (widen) - (cl-incf i) + (incf i) (unless (nnweb-get-hashtb url) (push (list - (cl-incf (cdr active)) + (incf (cdr active)) (make-full-mail-header (cdr active) (if Newsgroups (concat "(" Newsgroups ") " Subject) @@ -393,7 +393,7 @@ The only valid type is currently `google'.") (nconc nnweb-articles (nnweb-google-parse-1))) ;; Check if there are more articles to fetch (goto-char (point-min)) - (cl-incf i 100) + (incf i 100) (if (or (not (re-search-forward "]+href=\"\n?\\([^>\" \n\t]+\\)[^<]*]+src=[^>]+next" nil t)) @@ -473,7 +473,7 @@ The only valid type is currently `google'.") (rfc2047-encode-string subject)) (unless (nnweb-get-hashtb (mail-header-xref header)) - (setf (mail-header-number header) (cl-incf (cdr active))) + (setf (mail-header-number header) (incf (cdr active))) (push (list (mail-header-number header) header) map) (nnweb-set-hashtb (cadar map) (car map)))))) (forward-line 1))) diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index 5c25df049e3..983e82cb028 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el @@ -1750,7 +1750,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." ;; eliminate duplicates (dolist (article (copy-sequence ulist)) (when (memq article rlist) - (cl-incf delcount) + (incf delcount) (setq rlist (delq article rlist)) (setq ulist (delq article ulist)))) -- 2.39.5