summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2018-03-23 16:13:09 -0400
committerGlenn Morris <rgm@gnu.org>2018-03-23 16:14:47 -0400
commit4a05f85f5a0cde3d21fb40d2617c944b09a977cd (patch)
tree2f1a8b090ee7858f0efd2ca03fc33285381faca2 /lisp
parentaa83340fd43bf70f8bc2159310e18c3d0a2182a2 (diff)
downloademacs-4a05f85f5a0cde3d21fb40d2617c944b09a977cd.tar.gz
gnus: replace cl with cl-lib
* lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el: * lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el: * lisp/gnus/gnus-demon.el, lisp/gnus/gnus-group.el: * lisp/gnus/gnus-icalendar.el, lisp/gnus/gnus-logic.el: * lisp/gnus/gnus-msg.el, lisp/gnus/gnus-picon.el: * lisp/gnus/gnus-registry.el, lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-score.el, lisp/gnus/gnus-spec.el: * lisp/gnus/gnus-srvr.el, lisp/gnus/gnus-start.el: * lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el: * lisp/gnus/mail-source.el, lisp/gnus/mm-decode.el: * lisp/gnus/mm-encode.el, lisp/gnus/mm-url.el, lisp/gnus/mm-view.el: * lisp/gnus/mml-smime.el, lisp/gnus/mml.el, lisp/gnus/mml2015.el: * lisp/gnus/nnbabyl.el, lisp/gnus/nndoc.el, lisp/gnus/nneething.el: * lisp/gnus/nnheader.el, lisp/gnus/nnimap.el, lisp/gnus/nnmail.el: * lisp/gnus/nnmaildir.el, lisp/gnus/nnoo.el, lisp/gnus/nnrss.el: * lisp/gnus/nnspool.el, lisp/gnus/nntp.el, lisp/gnus/nnvirtual.el: * lisp/gnus/nnweb.el, lisp/gnus/spam.el: Replace cl with cl-lib. * lisp/gnus/canlock.el, lisp/gnus/gnus-bcklg.el: * lisp/gnus/gnus-cite.el, lisp/gnus/gnus-cloud.el: * lisp/gnus/gnus-draft.el, lisp/gnus/gnus-dup.el: * lisp/gnus/gnus-fun.el, lisp/gnus/gnus-html.el: * lisp/gnus/gnus-int.el, lisp/gnus/gnus-kill.el, lisp/gnus/gnus-ml.el: * lisp/gnus/gnus-mlspl.el, lisp/gnus/gnus-range.el: * lisp/gnus/gnus-undo.el, lisp/gnus/gnus-vm.el: * lisp/gnus/mm-partial.el, lisp/gnus/mm-uu.el, lisp/gnus/mml1991.el: * lisp/gnus/nnagent.el, lisp/gnus/nndiary.el, lisp/gnus/nndir.el: * lisp/gnus/nndraft.el, lisp/gnus/nnfolder.el, lisp/gnus/nngateway.el: * lisp/gnus/nnmairix.el, lisp/gnus/nnmbox.el, lisp/gnus/nnmh.el: * lisp/gnus/nnml.el, lisp/gnus/score-mode.el, lisp/gnus/smiley.el: No need for cl.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/canlock.el3
-rw-r--r--lisp/gnus/gnus-agent.el41
-rw-r--r--lisp/gnus/gnus-art.el9
-rw-r--r--lisp/gnus/gnus-async.el6
-rw-r--r--lisp/gnus/gnus-bcklg.el2
-rw-r--r--lisp/gnus/gnus-cache.el6
-rw-r--r--lisp/gnus/gnus-cite.el2
-rw-r--r--lisp/gnus/gnus-cloud.el1
-rw-r--r--lisp/gnus/gnus-demon.el6
-rw-r--r--lisp/gnus/gnus-draft.el1
-rw-r--r--lisp/gnus/gnus-dup.el2
-rw-r--r--lisp/gnus/gnus-fun.el3
-rw-r--r--lisp/gnus/gnus-group.el4
-rw-r--r--lisp/gnus/gnus-html.el2
-rw-r--r--lisp/gnus/gnus-icalendar.el6
-rw-r--r--lisp/gnus/gnus-int.el2
-rw-r--r--lisp/gnus/gnus-kill.el2
-rw-r--r--lisp/gnus/gnus-logic.el2
-rw-r--r--lisp/gnus/gnus-ml.el1
-rw-r--r--lisp/gnus/gnus-mlspl.el1
-rw-r--r--lisp/gnus/gnus-msg.el6
-rw-r--r--lisp/gnus/gnus-picon.el4
-rw-r--r--lisp/gnus/gnus-range.el2
-rw-r--r--lisp/gnus/gnus-registry.el32
-rw-r--r--lisp/gnus/gnus-salt.el10
-rw-r--r--lisp/gnus/gnus-score.el4
-rw-r--r--lisp/gnus/gnus-spec.el10
-rw-r--r--lisp/gnus/gnus-srvr.el4
-rw-r--r--lisp/gnus/gnus-start.el23
-rw-r--r--lisp/gnus/gnus-sum.el36
-rw-r--r--lisp/gnus/gnus-topic.el18
-rw-r--r--lisp/gnus/gnus-undo.el2
-rw-r--r--lisp/gnus/gnus-util.el5
-rw-r--r--lisp/gnus/gnus-uu.el6
-rw-r--r--lisp/gnus/gnus-vm.el3
-rw-r--r--lisp/gnus/gnus-win.el6
-rw-r--r--lisp/gnus/mail-source.el10
-rw-r--r--lisp/gnus/mm-decode.el2
-rw-r--r--lisp/gnus/mm-encode.el4
-rw-r--r--lisp/gnus/mm-partial.el2
-rw-r--r--lisp/gnus/mm-url.el4
-rw-r--r--lisp/gnus/mm-uu.el1
-rw-r--r--lisp/gnus/mm-view.el4
-rw-r--r--lisp/gnus/mml-smime.el4
-rw-r--r--lisp/gnus/mml.el12
-rw-r--r--lisp/gnus/mml1991.el4
-rw-r--r--lisp/gnus/mml2015.el4
-rw-r--r--lisp/gnus/nnagent.el1
-rw-r--r--lisp/gnus/nnbabyl.el4
-rw-r--r--lisp/gnus/nndiary.el1
-rw-r--r--lisp/gnus/nndir.el1
-rw-r--r--lisp/gnus/nndoc.el10
-rw-r--r--lisp/gnus/nndraft.el1
-rw-r--r--lisp/gnus/nneething.el4
-rw-r--r--lisp/gnus/nnfolder.el1
-rw-r--r--lisp/gnus/nngateway.el1
-rw-r--r--lisp/gnus/nnheader.el10
-rw-r--r--lisp/gnus/nnimap.el28
-rw-r--r--lisp/gnus/nnmail.el12
-rw-r--r--lisp/gnus/nnmaildir.el13
-rw-r--r--lisp/gnus/nnmairix.el2
-rw-r--r--lisp/gnus/nnmbox.el1
-rw-r--r--lisp/gnus/nnmh.el1
-rw-r--r--lisp/gnus/nnml.el1
-rw-r--r--lisp/gnus/nnoo.el4
-rw-r--r--lisp/gnus/nnrss.el14
-rw-r--r--lisp/gnus/nnspool.el4
-rw-r--r--lisp/gnus/nntp.el20
-rw-r--r--lisp/gnus/nnvirtual.el6
-rw-r--r--lisp/gnus/nnweb.el14
-rw-r--r--lisp/gnus/score-mode.el1
-rw-r--r--lisp/gnus/smiley.el1
-rw-r--r--lisp/gnus/spam.el22
73 files changed, 222 insertions, 280 deletions
diff --git a/lisp/gnus/canlock.el b/lisp/gnus/canlock.el
index 7c657ead78d..0bd47cdde9a 100644
--- a/lisp/gnus/canlock.el
+++ b/lisp/gnus/canlock.el
@@ -41,9 +41,6 @@
;;; Code:
-(eval-when-compile
- (require 'cl))
-
(require 'sha1)
(defvar mail-header-separator)
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index 628c9430c92..532fd7e7b8e 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -31,8 +31,7 @@
(require 'gnus-srvr)
(require 'gnus-util)
(require 'timer)
-(eval-when-compile
- (require 'cl))
+(eval-when-compile (require 'cl-lib))
(autoload 'gnus-server-update-server "gnus-srvr")
(autoload 'gnus-agent-customize-category "gnus-cus")
@@ -332,9 +331,9 @@ manipulated as follows:
`(progn (defmacro ,name (category)
(list 'cdr (list 'assq '',prop-name category)))
- (defsetf ,name (category) (value)
- (list 'gnus-agent-cat-set-property
- category '',prop-name value))))
+ (gv-define-setter ,name (value category)
+ (list 'gnus-agent-cat-set-property
+ category '',prop-name value))))
)
(defmacro gnus-agent-cat-name (category)
@@ -361,11 +360,7 @@ manipulated as follows:
(gnus-agent-cat-defaccessor
gnus-agent-cat-enable-undownloaded-faces agent-enable-undownloaded-faces)
-
-;; This form may expand to code that uses CL functions at run-time,
-;; but that's OK since those functions will only ever be called from
-;; something like `setf', so only when CL is loaded anyway.
-(defsetf gnus-agent-cat-groups gnus-agent-set-cat-groups)
+(gv-define-simple-setter gnus-agent-cat-groups gnus-agent-set-cat-groups)
(defun gnus-agent-set-cat-groups (category groups)
(unless (eq groups 'ignore)
@@ -2180,7 +2175,7 @@ article counts for each of the method's subscribed groups."
'gnus-agent-file-loading-local
'gnus-agent-read-and-cache-local))
(when gnus-agent-article-local-times
- (incf gnus-agent-article-local-times)))
+ (cl-incf gnus-agent-article-local-times)))
gnus-agent-article-local))
(defun gnus-agent-read-and-cache-local (file)
@@ -3353,9 +3348,9 @@ missing NOV entry. Run gnus-agent-regenerate-group to restore it.")))
(let* ((file-name (nnheader-concat dir (number-to-string
article-number)))
(size (float (nth 7 (file-attributes file-name)))))
- (incf bytes-freed size)
- (incf size-files-deleted size)
- (incf files-deleted)
+ (cl-incf bytes-freed size)
+ (cl-incf size-files-deleted size)
+ (cl-incf files-deleted)
(delete-file file-name))
(push "expired cached article" actions))
(setf (nth 1 entry) nil)
@@ -3368,13 +3363,13 @@ missing NOV entry. Run gnus-agent-regenerate-group to restore it.")))
marker
(- marker position-offset)))
- (incf nov-entries-deleted)
+ (cl-incf nov-entries-deleted)
(let* ((from (point-at-bol))
(to (progn (forward-line 1) (point)))
(freed (- to from)))
- (incf bytes-freed freed)
- (incf position-offset freed)
+ (cl-incf bytes-freed freed)
+ (cl-incf position-offset freed)
(delete-region from to)))
;; If considering all articles is set, I can only
@@ -3431,9 +3426,9 @@ expiration tests failed." decoded article-number)
(when (boundp 'gnus-agent-expire-stats)
(let ((stats gnus-agent-expire-stats))
- (incf (nth 2 stats) bytes-freed)
- (incf (nth 1 stats) files-deleted)
- (incf (nth 0 stats) nov-entries-deleted)))
+ (cl-incf (nth 2 stats) bytes-freed)
+ (cl-incf (nth 1 stats) files-deleted)
+ (cl-incf (nth 0 stats) nov-entries-deleted)))
(gnus-agent-update-files-total-fetched-for group (- size-files-deleted)))))))
@@ -4110,7 +4105,7 @@ agent has fetched."
(let ((sum 0.0)
file)
(while (setq file (pop delta))
- (incf sum (float (or (nth 7 (file-attributes
+ (cl-incf sum (float (or (nth 7 (file-attributes
(nnheader-concat
path
(if (numberp file)
@@ -4122,11 +4117,11 @@ agent has fetched."
path nil "^-?[0-9]+$" t))
file)
(while (setq file (pop info))
- (incf sum (float (or (nth 8 file) 0))))
+ (cl-incf sum (float (or (nth 8 file) 0))))
(setq delta sum))))
(setq gnus-agent-need-update-total-fetched-for t)
- (incf (nth 2 entry) delta))))))
+ (cl-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 f23b910ed2c..595ae58c813 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -24,8 +24,7 @@
;;; Code:
-(eval-when-compile
- (require 'cl))
+(eval-when-compile (require 'cl-lib))
(defvar tool-bar-map)
(defvar w3m-minor-mode-map)
@@ -1798,7 +1797,7 @@ Initialized from `text-mode-syntax-table'.")
(if (looking-at (car list))
(setq list nil)
(setq list (cdr list))
- (incf i)))
+ (cl-incf i)))
i))
(defun article-hide-headers (&optional _arg _delete)
@@ -2221,7 +2220,7 @@ This only works if the article in question is HTML."
(w3m-toggle-inline-images)
(dolist (region (gnus-find-text-property-region (point-min) (point-max)
'image-displayer))
- (destructuring-bind (start end function) region
+ (cl-destructuring-bind (start end function) region
(funcall function (get-text-property start 'image-url)
start end)))))))
@@ -8211,7 +8210,7 @@ url is put as the `gnus-button-url' overlay property on the button."
(defun gnus-button-handle-news (url)
"Fetch a news URL."
- (destructuring-bind (_scheme server port group message-id _articles)
+ (cl-destructuring-bind (_scheme server port group message-id _articles)
(gnus-parse-news-url url)
(cond
(message-id
diff --git a/lisp/gnus/gnus-async.el b/lisp/gnus/gnus-async.el
index 7003aef24f7..ad25f805ca1 100644
--- a/lisp/gnus/gnus-async.el
+++ b/lisp/gnus/gnus-async.el
@@ -24,7 +24,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-sum)
@@ -183,7 +183,7 @@ that was fetched."
d)
(while (and (setq d (pop data))
(if (numberp n)
- (natnump (decf n))
+ (natnump (cl-decf n))
n))
(unless (or (gnus-async-prefetched-article-entry
group (setq article (gnus-data-number d)))
@@ -290,7 +290,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)
- (incf tries)
+ (cl-incf tries)
(when (nntp-accept-process-output proc)
(setq tries 0))
(when (and (not nntp-have-messaged)
diff --git a/lisp/gnus/gnus-bcklg.el b/lisp/gnus/gnus-bcklg.el
index 8afc31327d7..95cb1ca5ecc 100644
--- a/lisp/gnus/gnus-bcklg.el
+++ b/lisp/gnus/gnus-bcklg.el
@@ -24,8 +24,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus)
;;;
diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el
index 1cdfea625fc..6afc52c0fce 100644
--- a/lisp/gnus/gnus-cache.el
+++ b/lisp/gnus/gnus-cache.el
@@ -24,7 +24,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-sum)
@@ -863,11 +863,11 @@ supported."
(while (setq file (pop files))
(setq attrs (file-attributes file))
(unless (nth 0 attrs)
- (incf size (float (nth 7 attrs)))))))
+ (cl-incf size (float (nth 7 attrs)))))))
(setq gnus-cache-need-update-total-fetched-for t)
- (incf (nth 1 entry) (if subtract (- size) size))))))
+ (cl-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-cite.el b/lisp/gnus/gnus-cite.el
index 07a84940269..64d3a396f3d 100644
--- a/lisp/gnus/gnus-cite.el
+++ b/lisp/gnus/gnus-cite.el
@@ -23,8 +23,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus)
(require 'gnus-range)
(require 'gnus-art)
diff --git a/lisp/gnus/gnus-cloud.el b/lisp/gnus/gnus-cloud.el
index 86cd399ff1c..16bd80dbfa1 100644
--- a/lisp/gnus/gnus-cloud.el
+++ b/lisp/gnus/gnus-cloud.el
@@ -28,7 +28,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
(require 'parse-time)
(require 'nnimap)
diff --git a/lisp/gnus/gnus-demon.el b/lisp/gnus/gnus-demon.el
index 72b0f5cecff..2405c705651 100644
--- a/lisp/gnus/gnus-demon.el
+++ b/lisp/gnus/gnus-demon.el
@@ -24,7 +24,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-int)
@@ -101,7 +101,7 @@ If not, and a TIME is given, restart a new idle timer, so FUNC
can be called at the next opportunity. Such a special idle run is
marked with SPECIAL."
(unless gnus-inhibit-demon
- (block run-callback
+ (cl-block run-callback
(when (eq idle t)
(setq idle 0.001))
(cond (special
@@ -117,7 +117,7 @@ marked with SPECIAL."
(run-with-idle-timer idle nil
'gnus-demon-run-callback
func idle time t))))
- (return-from run-callback)))
+ (cl-return-from run-callback)))
(with-local-quit
(ignore-errors
(funcall func))))))
diff --git a/lisp/gnus/gnus-draft.el b/lisp/gnus/gnus-draft.el
index 7a37a86fb6f..7d4be47e41b 100644
--- a/lisp/gnus/gnus-draft.el
+++ b/lisp/gnus/gnus-draft.el
@@ -30,7 +30,6 @@
(require 'gnus-msg)
(require 'nndraft)
(require 'gnus-agent)
-(eval-when-compile (require 'cl))
;;; Draft minor mode
diff --git a/lisp/gnus/gnus-dup.el b/lisp/gnus/gnus-dup.el
index d1335fc8c16..a03c6c140cd 100644
--- a/lisp/gnus/gnus-dup.el
+++ b/lisp/gnus/gnus-dup.el
@@ -29,8 +29,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus)
(require 'gnus-art)
diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el
index 40c6d511115..f1fd51d5509 100644
--- a/lisp/gnus/gnus-fun.el
+++ b/lisp/gnus/gnus-fun.el
@@ -24,9 +24,6 @@
;;; Code:
-(eval-when-compile
- (require 'cl))
-
(require 'mm-util)
(require 'gnus-util)
(require 'gnus)
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 4dd5fec6df3..10d203408a1 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -1901,7 +1901,7 @@ If FIRST-TOO, the current line is also eligible as a target."
(insert-char gnus-process-mark 1 t)))
(unless no-advance
(gnus-group-next-group 1))
- (decf n))
+ (cl-decf n))
(gnus-group-position-point)
n))
@@ -3924,7 +3924,7 @@ yanked) a list of yanked groups is returned."
(interactive "p")
(setq arg (or arg 1))
(let (info group prev out)
- (while (>= (decf arg) 0)
+ (while (>= (cl-decf arg) 0)
(when (not (setq info (pop gnus-list-of-killed-groups)))
(error "No more newsgroups to yank"))
(push (setq group (nth 1 info)) out)
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el
index 5d07a823f61..f097028cb3e 100644
--- a/lisp/gnus/gnus-html.el
+++ b/lisp/gnus/gnus-html.el
@@ -28,8 +28,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus-art)
(eval-when-compile (require 'mm-decode))
diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el
index 48cffdb7388..3365c826e11 100644
--- a/lisp/gnus/gnus-icalendar.el
+++ b/lisp/gnus/gnus-icalendar.el
@@ -40,7 +40,7 @@
(require 'gnus-sum)
(require 'gnus-art)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(defun gnus-icalendar-find-if (pred seq)
(catch 'found
@@ -238,7 +238,7 @@
"\\\\n" "\n" (substring-no-properties value))))))
(accumulate-args
(mapping)
- (destructuring-bind (slot . ical-property) mapping
+ (cl-destructuring-bind (slot . ical-property) mapping
(setq args (append (list
(intern (concat ":" (symbol-name slot)))
(map-property ical-property))
@@ -443,7 +443,7 @@ Return nil for non-recurring EVENT."
;; A 0:0 - A .:. -> A 0:0-.:. (default 1)
;; A 0:0 - A+n .:. -> A - A+n .:.
((and start-at-midnight
- (plusp start-end-date-diff)) (format "<%s>--<%s %s>" start-date end-date end-time))
+ (cl-plusp start-end-date-diff)) (format "<%s>--<%s %s>" start-date end-date end-time))
;; default
;; A .:. - A .:. -> A .:.-.:.
;; A .:. - B .:.
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el
index a17741b577c..5d5f9ebb670 100644
--- a/lisp/gnus/gnus-int.el
+++ b/lisp/gnus/gnus-int.el
@@ -24,8 +24,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus)
(require 'message)
(require 'gnus-range)
diff --git a/lisp/gnus/gnus-kill.el b/lisp/gnus/gnus-kill.el
index fd5935b87f8..60732c11d54 100644
--- a/lisp/gnus/gnus-kill.el
+++ b/lisp/gnus/gnus-kill.el
@@ -25,8 +25,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus)
(require 'gnus-art)
(require 'gnus-range)
diff --git a/lisp/gnus/gnus-logic.el b/lisp/gnus/gnus-logic.el
index e0dba06d397..2076d8aebe7 100644
--- a/lisp/gnus/gnus-logic.el
+++ b/lisp/gnus/gnus-logic.el
@@ -24,7 +24,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-score)
diff --git a/lisp/gnus/gnus-ml.el b/lisp/gnus/gnus-ml.el
index f78efdee65b..1c67f5ffba0 100644
--- a/lisp/gnus/gnus-ml.el
+++ b/lisp/gnus/gnus-ml.el
@@ -28,7 +28,6 @@
(require 'gnus)
(require 'gnus-msg)
-(eval-when-compile (require 'cl))
;;; Mailing list minor mode
diff --git a/lisp/gnus/gnus-mlspl.el b/lisp/gnus/gnus-mlspl.el
index eeb65e67e88..fb45007c126 100644
--- a/lisp/gnus/gnus-mlspl.el
+++ b/lisp/gnus/gnus-mlspl.el
@@ -24,7 +24,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
(require 'gnus)
(require 'gnus-sum)
(require 'gnus-group)
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index effbe2cc5f4..04661ec9481 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -25,7 +25,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'message)
@@ -1113,11 +1113,11 @@ If SILENT, don't prompt the user."
((and (eq gnus-post-method 'current)
(not (memq (car group-method) gnus-discouraged-post-methods))
(gnus-get-function group-method 'request-post t))
- (assert (not arg))
+ (cl-assert (not arg))
group-method)
;; Use gnus-post-method.
((listp gnus-post-method) ;A method...
- (assert (not (listp (car gnus-post-method)))) ;... not a list of methods.
+ (cl-assert (not (listp (car gnus-post-method)))) ;... not a list of methods.
gnus-post-method)
;; Use the normal select method (nil or native).
(t gnus-select-method))))
diff --git a/lisp/gnus/gnus-picon.el b/lisp/gnus/gnus-picon.el
index 8f3efa41675..b6bb5c9c2b7 100644
--- a/lisp/gnus/gnus-picon.el
+++ b/lisp/gnus/gnus-picon.el
@@ -37,7 +37,7 @@
;;
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-art)
@@ -211,7 +211,7 @@ replacement is added."
(gnus-article-goto-header header)
(mail-header-narrow-to-field)
- (case gnus-picon-style
+ (cl-case gnus-picon-style
(right
(when (= (length addresses) 1)
(setq len (apply '+ (mapcar (lambda (x)
diff --git a/lisp/gnus/gnus-range.el b/lisp/gnus/gnus-range.el
index 32433816e4c..dd3793593e0 100644
--- a/lisp/gnus/gnus-range.el
+++ b/lisp/gnus/gnus-range.el
@@ -24,8 +24,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
-
;;; List and range functions
(defsubst gnus-range-normalize (range)
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index 7ae81b02a2e..643b8f11654 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -76,7 +76,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(eval-when-compile (require 'subr-x))
(require 'gnus)
@@ -373,7 +373,7 @@ This is not required after changing `gnus-registry-cache-file'."
(grouphashtb (registry-lookup-secondary db 'group))
(old-size (registry-size db)))
(registry-reindex db)
- (loop for k being the hash-keys of grouphashtb
+ (cl-loop for k being the hash-keys of grouphashtb
using (hash-values v)
when (gnus-registry-ignore-group-p k)
do (registry-delete db v nil))
@@ -444,14 +444,14 @@ This is not required after changing `gnus-registry-cache-file'."
(sender ,sender)
(recipient ,@recipients)
(subject ,subject)))
- (when (second kv)
- (let ((new (or (assq (first kv) entry)
- (list (first kv)))))
+ (when (cadr kv)
+ (let ((new (or (assq (car kv) entry)
+ (list (car kv)))))
(dolist (toadd (cdr kv))
(unless (member toadd new)
(setq new (append new (list toadd)))))
(setq entry (cons new
- (assq-delete-all (first kv) entry))))))
+ (assq-delete-all (car kv) entry))))))
(gnus-message 10 "Gnus registry: new entry for %s is %S"
id
entry)
@@ -505,7 +505,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
:subject subject
:log-agent "Gnus registry fancy splitting with parent")))
-(defun* gnus-registry--split-fancy-with-parent-internal
+(cl-defun gnus-registry--split-fancy-with-parent-internal
(&rest spec
&key references refstr sender subject recipients log-agent
&allow-other-keys)
@@ -525,7 +525,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
log-agent refstr)
(dolist (reference (nreverse references))
(gnus-message 9 "%s is looking up %s" log-agent reference)
- (loop for group in (gnus-registry-get-id-key reference 'group)
+ (cl-loop for group in (gnus-registry-get-id-key reference 'group)
when (gnus-registry-follow-group-p group)
do
(progn
@@ -548,7 +548,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
(gnus-registry-get-id-key reference 'group))
(registry-lookup-secondary-value db 'subject subject)))))
(setq found
- (loop for group in groups
+ (cl-loop for group in groups
when (gnus-registry-follow-group-p group)
do (gnus-message
;; warn more if gnus-registry-track-extra
@@ -575,7 +575,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
(gnus-registry-get-id-key reference 'group))
(registry-lookup-secondary-value db 'sender sender)))))
(setq found
- (loop for group in groups
+ (cl-loop for group in groups
when (gnus-registry-follow-group-p group)
do (gnus-message
;; warn more if gnus-registry-track-extra
@@ -605,7 +605,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
(registry-lookup-secondary-value
db 'recipient recp)))))
(setq found
- (loop for group in groups
+ (cl-loop for group in groups
when (gnus-registry-follow-group-p group)
do (gnus-message
;; warn more if gnus-registry-track-extra
@@ -641,7 +641,7 @@ possible. Uses `gnus-registry-split-strategy'."
out chosen)
;; the strategy can be nil, in which case chosen is nil
(setq chosen
- (case gnus-registry-split-strategy
+ (cl-case gnus-registry-split-strategy
;; default, take only one-element lists into chosen
((nil)
(and (= (length groups) 1)
@@ -693,7 +693,7 @@ possible. Uses `gnus-registry-split-strategy'."
10
"%s: stripped group %s to %s"
log-agent group short-name))
- (pushnew short-name out :test #'equal))
+ (cl-pushnew short-name out :test #'equal))
;; else...
(gnus-message
7
@@ -1086,7 +1086,7 @@ only the last one's marks are returned."
(expected (length old))
entry)
(while (car-safe old)
- (incf count)
+ (cl-incf count)
;; don't use progress reporters for backwards compatibility
(when (and (< 0 expected)
(= 0 (mod count 100)))
@@ -1096,7 +1096,7 @@ only the last one's marks are returned."
old (cdr-safe old))
(let* ((id (car-safe entry))
(rest (cdr-safe entry))
- (groups (loop for p in rest
+ (groups (cl-loop for p in rest
when (stringp p)
collect p))
extra-cell key val)
@@ -1232,7 +1232,7 @@ from your existing entries."
(when extra
(let ((db gnus-registry-db))
(registry-reindex db)
- (loop for k being the hash-keys of (oref db data)
+ (cl-loop for k being the hash-keys of (oref db data)
using (hash-value v)
do (let ((newv (delq nil (mapcar #'(lambda (entry)
(unless (member (car entry) extra)
diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el
index a80bb5b7037..aff841760ae 100644
--- a/lisp/gnus/gnus-salt.el
+++ b/lisp/gnus/gnus-salt.el
@@ -24,7 +24,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-sum)
@@ -131,7 +131,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."
- (incf gnus-pick-line-number))
+ (cl-incf gnus-pick-line-number))
(defun gnus-pick-start-reading (&optional catch-up)
"Start reading the picked articles.
@@ -552,7 +552,7 @@ Two predefined functions are available:
(not (one-window-p)))
(let ((windows 0)
tot-win-height)
- (walk-windows (lambda (_window) (incf windows)))
+ (walk-windows (lambda (_window) (cl-incf windows)))
(setq tot-win-height
(- (frame-height)
(* window-min-height (1- windows))
@@ -734,7 +734,7 @@ it in the environment specified by BINDINGS."
(insert (make-string len ? )))))
(defsubst gnus-tree-forward-line (n)
- (while (>= (decf n) 0)
+ (while (>= (cl-decf n) 0)
(unless (zerop (forward-line 1))
(end-of-line)
(insert "\n")))
@@ -784,7 +784,7 @@ it in the environment specified by BINDINGS."
(progn
(goto-char (point-min))
(end-of-line)
- (incf gnus-tmp-indent))
+ (cl-incf gnus-tmp-indent))
;; Recurse downwards in all children of this article.
(while thread
(gnus-generate-vertical-tree
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el
index ad11ff4a5c5..4192381700d 100644
--- a/lisp/gnus/gnus-score.el
+++ b/lisp/gnus/gnus-score.el
@@ -25,7 +25,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-sum)
@@ -3077,7 +3077,7 @@ If ADAPT, return the home adaptive file instead."
(setq score (or (nth 1 kill)
gnus-score-interactive-default-score)
n times)
- (while (natnump (decf n))
+ (while (natnump (cl-decf n))
(setq score (funcall gnus-decay-score-function score)))
(setcdr kill (cons score
(cdr (cdr kill)))))))))
diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el
index 082ebf15529..379a7f2b5c3 100644
--- a/lisp/gnus/gnus-spec.el
+++ b/lisp/gnus/gnus-spec.el
@@ -24,7 +24,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(defvar gnus-newsrc-file-version)
(require 'gnus)
@@ -285,15 +285,15 @@ Return a list of updated types."
;; Find the start position.
(while (and (< seek length)
(< wseek start))
- (incf wseek (char-width (aref string seek)))
- (incf seek))
+ (cl-incf wseek (char-width (aref string seek)))
+ (cl-incf seek))
(setq wstart seek)
;; Find the end position.
(while (and (<= seek length)
(or (not end)
(<= wseek end)))
- (incf wseek (char-width (aref string seek)))
- (incf seek))
+ (cl-incf wseek (char-width (aref string seek)))
+ (cl-incf seek))
(setq wend seek)
(substring string wstart (1- wend))))
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el
index 6c6c3b7e30e..94fd21b9204 100644
--- a/lisp/gnus/gnus-srvr.el
+++ b/lisp/gnus/gnus-srvr.el
@@ -24,7 +24,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-start)
@@ -969,7 +969,7 @@ how new groups will be entered into the group buffer."
(not (eobp))
(gnus-browse-unsubscribe-group)
(zerop (gnus-browse-next-group ward)))
- (decf arg))
+ (cl-decf arg))
(gnus-group-position-point)
(when (/= 0 arg)
(gnus-message 7 "No more newsgroups"))
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index 2a7a303408e..bae01aca87d 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -36,8 +36,7 @@
(autoload 'gnus-agent-save-local "gnus-agent")
(autoload 'gnus-agent-possibly-alter-active "gnus-agent")
-(eval-when-compile
- (require 'cl))
+(eval-when-compile (require 'cl-lib))
(defvar gnus-agent-covered-methods)
(defvar gnus-agent-file-loading-local)
@@ -1231,14 +1230,14 @@ for new groups, and subscribe the new groups as zombies."
(let ((do-sub (gnus-matches-options-n group)))
(cond
((eq do-sub 'subscribe)
- (incf groups)
+ (cl-incf groups)
(gnus-sethash group group gnus-killed-hashtb)
(gnus-call-subscribe-functions
gnus-subscribe-options-newsgroup-method group))
((eq do-sub 'ignore)
nil)
(t
- (incf groups)
+ (cl-incf groups)
(gnus-sethash group group gnus-killed-hashtb)
(if gnus-subscribe-hierarchical-interactive
(push group new-newsgroups)
@@ -1700,7 +1699,7 @@ backend check whether the group actually exists."
;; aren't equal (and that need extension; i.e., they are async).
(let ((methods nil))
(dolist (elem type-cache)
- (destructuring-bind (method method-type infos dummy) elem
+ (cl-destructuring-bind (method method-type infos dummy) elem
(let ((gnus-opened-servers methods))
(when (and (gnus-similar-server-opened method)
(gnus-check-backend-function
@@ -1723,7 +1722,7 @@ backend check whether the group actually exists."
;; Clear out all the early methods.
(dolist (elem type-cache)
- (destructuring-bind (method method-type infos dummy) elem
+ (cl-destructuring-bind (method method-type infos dummy) elem
(when (and method
infos
(gnus-check-backend-function
@@ -1740,7 +1739,7 @@ backend check whether the group actually exists."
(let ((done-methods nil)
sanity-spec)
(dolist (elem type-cache)
- (destructuring-bind (method method-type infos dummy) elem
+ (cl-destructuring-bind (method method-type infos dummy) elem
(setq sanity-spec (list (car method) (cadr method)))
(when (and method infos
(not (gnus-method-denied-p method)))
@@ -1771,7 +1770,7 @@ backend check whether the group actually exists."
;; Do the rest of the retrieval.
(dolist (elem type-cache)
- (destructuring-bind (method method-type infos early-data) elem
+ (cl-destructuring-bind (method method-type infos early-data) elem
(when (and method infos
(not (gnus-method-denied-p method)))
(let ((updatep (gnus-check-backend-function
@@ -1795,11 +1794,11 @@ backend check whether the group actually exists."
;; are in the secondary select list.
((eq type 'secondary)
(let ((i 2))
- (block nil
- (dolist (smethod gnus-secondary-select-methods)
+ (cl-block nil
+ (cl-dolist (smethod gnus-secondary-select-methods)
(when (equal method smethod)
- (return i))
- (incf i))
+ (cl-return i))
+ (cl-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 a5756b1a202..4d95a6442d3 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -3809,7 +3809,7 @@ the thread are to be displayed."
1)
(t 0))))
(when (and level (zerop level) gnus-tmp-new-adopts)
- (incf number
+ (cl-incf number
(apply '+ (mapcar
'gnus-summary-number-of-articles-in-thread
gnus-tmp-new-adopts))))
@@ -4411,7 +4411,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 (incf generation)
+ (push (list (cl-incf generation)
child (setq child new-child)
subject date)
relations)))
@@ -4432,7 +4432,7 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise."
(push gnus-reffed-article-number gnus-newsgroup-sparse)
(push (cons gnus-reffed-article-number gnus-sparse-mark)
gnus-newsgroup-reads)
- (decf gnus-reffed-article-number)))
+ (cl-decf gnus-reffed-article-number)))
(gnus-message 7 "Making sparse threads...done")))
(defun gnus-build-old-threads ()
@@ -4725,7 +4725,7 @@ If LINE, insert the rebuilt thread starting on line LINE."
(setq parent (gnus-parent-id references)))
(car (gnus-id-to-thread parent))
nil))
- (decf generation))
+ (cl-decf generation))
(and (not (eq headers in-headers))
headers)))
@@ -5469,7 +5469,7 @@ or a straight list of headers."
(nthcdr 1 thread))
stack))
(push (if (nth 1 thread) 1 0) tree-stack)
- (incf gnus-tmp-level)
+ (cl-incf gnus-tmp-level)
(setq threads (if thread-end nil (cdar thread)))
(if gnus-summary-display-while-building
(if building-count
@@ -6117,7 +6117,7 @@ If SELECT-ARTICLES, only select those articles from GROUP."
(let ((i 5))
(while (and (> i 2)
(not (nth i info)))
- (when (nthcdr (decf i) info)
+ (when (nthcdr (cl-decf i) info)
(setcdr (nthcdr i info) nil)))))))
(defun gnus-set-mode-line (where)
@@ -6657,7 +6657,7 @@ current article will be taken into consideration."
(if backward
(gnus-summary-find-prev nil article)
(gnus-summary-find-next nil article)))
- (decf n)))
+ (cl-decf n)))
(nreverse articles)))
((and (and transient-mark-mode mark-active) (mark))
(message "region active")
@@ -8761,7 +8761,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)
- (incf num))
+ (cl-incf num))
(pop threads))
(< num 2)))
@@ -8893,7 +8893,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.
- (incf gnus-newsgroup-expunged-tally)
+ (cl-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))
@@ -8918,7 +8918,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))))
- (incf gnus-newsgroup-expunged-tally)
+ (cl-incf gnus-newsgroup-expunged-tally)
;; We also mark as read here, if that's wanted.
(setq gnus-newsgroup-unreads
(delq number gnus-newsgroup-unreads))
@@ -8970,7 +8970,7 @@ The difference between N and the number of articles fetched is returned."
(gnus-message 1 "No references in article %d"
(gnus-summary-article-number))
(setq error t))
- (decf n))
+ (cl-decf n))
(gnus-summary-position-point)
n))
@@ -8986,7 +8986,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)
- (incf n)
+ (cl-incf n)
;; ... fetch that article.
(gnus-summary-refer-article
(prog1 (match-string 0 ref)
@@ -11148,7 +11148,7 @@ If NO-EXPIRE, auto-expiry will be inhibited."
(re-search-backward "[\n\r]" (point-at-bol) 'move-to-limit)
(when forward
(when (looking-at "\r")
- (incf forward))
+ (cl-incf forward))
(when (<= (+ forward (point)) (point-max))
;; Go to the right position on the line.
(goto-char (+ forward (point)))
@@ -11728,7 +11728,7 @@ will not be hidden."
(let ((end nil)
(count 0))
(while (not end)
- (incf count)
+ (cl-incf count)
(when (zerop (mod count 1000))
(message "Hiding all threads... %d" count))
(when (or (not predicate)
@@ -11800,7 +11800,7 @@ If SILENT, don't output messages."
(n (abs n)))
(while (and (> n 0)
(gnus-summary-go-to-next-thread backward))
- (decf n))
+ (cl-decf n))
(unless silent
(gnus-summary-position-point))
(when (and (not silent) (/= 0 n))
@@ -12371,7 +12371,7 @@ If REVERSE, save parts that do not match TYPE."
(cdr gnus-article-current)
gnus-summary-save-parts-counter))))
dir)))
- (incf gnus-summary-save-parts-counter)
+ (cl-incf gnus-summary-save-parts-counter)
(unless (file-exists-p file)
(mm-save-part-to-file handle file))))))
@@ -12544,7 +12544,7 @@ If REVERSE, save parts that do not match TYPE."
;; article numbers for this article.
(mail-header-set-number header gnus-reffed-article-number))
(with-current-buffer gnus-summary-buffer
- (decf gnus-reffed-article-number)
+ (cl-decf gnus-reffed-article-number)
(gnus-remove-header (mail-header-number header))
(push header gnus-newsgroup-headers)
(setq gnus-current-headers header)
@@ -13019,7 +13019,7 @@ If ALL is a number, fetch this number of articles."
gnus-newsgroup-highest i)
(while (> i old-high)
(push i new)
- (decf i))
+ (cl-decf i))
(if (not new)
(message "No gnus is bad news")
(gnus-summary-insert-articles new)
diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el
index ddaace9a24d..111f2ae28a4 100644
--- a/lisp/gnus/gnus-topic.el
+++ b/lisp/gnus/gnus-topic.el
@@ -25,7 +25,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-group)
@@ -128,7 +128,7 @@ See Info node `(gnus)Formatting Variables'."
number)
(while entries
(when (numberp (setq number (car (pop entries))))
- (incf total number)))
+ (cl-incf total number)))
total))
(defun gnus-group-topic (group)
@@ -304,7 +304,7 @@ If RECURSIVE is t, return groups in its subtopics too."
(while (and (not (zerop num))
(setq topic (funcall way topic)))
(when (gnus-topic-goto-topic topic)
- (decf num)))
+ (cl-decf num)))
(unless (zerop num)
(goto-char (point-max)))
num))
@@ -510,7 +510,7 @@ articles in the topic and its subtopics."
info entry end active tick)
;; Insert any sub-topics.
(while topicl
- (incf unread
+ (cl-incf unread
(gnus-topic-prepare-topic
(pop topicl) (1+ level) list-level predicate
(not visiblep) lowest regexp)))
@@ -564,7 +564,7 @@ articles in the topic and its subtopics."
(car entry) (gnus-info-method info)))))
(when (and (listp entry)
(numberp (car entry)))
- (incf unread (car entry)))
+ (cl-incf unread (car entry)))
(when (listp entry)
(setq tick t))))
(goto-char beg)
@@ -730,10 +730,10 @@ articles in the topic and its subtopics."
(cdr gnus-group-list-mode)))
entry)
(while children
- (incf unread (gnus-topic-unread (caar (pop children)))))
+ (cl-incf unread (gnus-topic-unread (caar (pop children)))))
(while (setq entry (pop entries))
(when (numberp (car entry))
- (incf unread (car entry))))
+ (cl-incf unread (car entry))))
(gnus-topic-insert-topic-line
topic t t (car (gnus-topic-find-topology topic)) nil unread)))
@@ -774,10 +774,10 @@ articles in the topic and its subtopics."
(if reads
(setq unread (- (gnus-group-topic-unread) reads))
(while children
- (incf unread (gnus-topic-unread (caar (pop children)))))
+ (cl-incf unread (gnus-topic-unread (caar (pop children)))))
(while (setq entry (pop entries))
(when (numberp (car entry))
- (incf unread (car entry)))))
+ (cl-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-undo.el b/lisp/gnus/gnus-undo.el
index 8144e0cadc8..d487262c931 100644
--- a/lisp/gnus/gnus-undo.el
+++ b/lisp/gnus/gnus-undo.el
@@ -43,8 +43,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus-util)
(require 'gnus)
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 8983132bfb3..932ae5b5411 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -32,8 +32,7 @@
;;; Code:
-(eval-when-compile
- (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'time-date)
@@ -1408,7 +1407,7 @@ SPEC is a predicate specifier that contains stuff like `or', `and',
(symbol-value history) collection))
filtered-choices)
(dolist (x choices)
- (setq filtered-choices (adjoin x filtered-choices)))
+ (setq filtered-choices (cl-adjoin x filtered-choices)))
(nreverse filtered-choices))))))
(unwind-protect
(progn
diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el
index f660b861f7b..a171a385956 100644
--- a/lisp/gnus/gnus-uu.el
+++ b/lisp/gnus/gnus-uu.el
@@ -26,7 +26,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-art)
@@ -2047,7 +2047,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)
- (incf parts)))
+ (cl-incf parts)))
(when gnus-uu-post-separate-description
(forward-line -1))
@@ -2106,7 +2106,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)
- (incf i)
+ (cl-incf i)
(goto-char (point-min))
(re-search-forward
(concat "^" (regexp-quote mail-header-separator) "$") nil t)
diff --git a/lisp/gnus/gnus-vm.el b/lisp/gnus/gnus-vm.el
index 4b4152fd5d3..24235d9c718 100644
--- a/lisp/gnus/gnus-vm.el
+++ b/lisp/gnus/gnus-vm.el
@@ -34,9 +34,6 @@
(require 'gnus)
(require 'gnus-msg)
-(eval-when-compile
- (require 'cl))
-
(defvar gnus-vm-inhibit-window-system nil
"Inhibit loading `win-vm' if using a window-system.
Has to be set before gnus-vm is loaded.")
diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el
index fd0c7181951..ff3073a6794 100644
--- a/lisp/gnus/gnus-win.el
+++ b/lisp/gnus/gnus-win.el
@@ -24,7 +24,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-util)
@@ -312,7 +312,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))
- (incf i))
+ (cl-incf i))
;; Select the frame that has the selected buffer.
(when fresult
(select-frame (window-frame fresult)))))
@@ -344,7 +344,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)
- (incf total s)))
+ (cl-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 d2850f4cee3..51f76a4a2e8 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -26,7 +26,7 @@
(require 'format-spec)
(eval-when-compile
- (require 'cl)
+ (require 'cl-lib)
(require 'imap))
(autoload 'auth-source-search "auth-source")
(autoload 'pop3-movemail "pop3")
@@ -439,7 +439,7 @@ the `mail-source-keyword-map' variable."
;; the msname is the mail-source parameter
(dolist (msname '(:server :user :port))
;; the asname is the auth-source parameter
- (let* ((asname (case msname
+ (let* ((asname (cl-case msname
(:server :host) ; auth-source uses :host
(t msname)))
;; this is the mail-source default
@@ -786,7 +786,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))
- (incf found (mail-source-callback callback file))
+ (cl-incf found (mail-source-callback callback file))
(mail-source-run-script postscript (format-spec-make ?t path))
(mail-source-delete-crash-box)))
found)))
@@ -1041,7 +1041,7 @@ This only works when `display-time' is enabled."
(insert "\001\001\001\001\n"))
(delete-file file)
nil))))
- (incf found (mail-source-callback callback file))
+ (cl-incf found (mail-source-callback callback file))
(mail-source-delete-crash-box)))))
found)))
@@ -1116,7 +1116,7 @@ This only works when `display-time' is enabled."
(replace-match ">From "))
(goto-char (point-max))))
(nnheader-ms-strip-cr))
- (incf found (mail-source-callback callback server))
+ (cl-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/mm-decode.el b/lisp/gnus/mm-decode.el
index 372b6da44b5..6fb376fa7cd 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -25,7 +25,7 @@
(require 'mail-parse)
(require 'mm-bodies)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(autoload 'gnus-map-function "gnus-util")
diff --git a/lisp/gnus/mm-encode.el b/lisp/gnus/mm-encode.el
index 2eec32b9ac0..361e85fbe1f 100644
--- a/lisp/gnus/mm-encode.el
+++ b/lisp/gnus/mm-encode.el
@@ -23,7 +23,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'mail-parse)
(autoload 'mailcap-extension-to-mime "mailcap")
(autoload 'mm-body-7-or-8 "mm-bodies")
@@ -204,7 +204,7 @@ This is either `base64' or `quoted-printable'."
(goto-char (point-min))
(skip-chars-forward "\x20-\x7f\r\n\t" limit)
(while (< (point) limit)
- (incf n8bit)
+ (cl-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/mm-partial.el b/lisp/gnus/mm-partial.el
index b380fae7666..51dc8b89e3a 100644
--- a/lisp/gnus/mm-partial.el
+++ b/lisp/gnus/mm-partial.el
@@ -24,8 +24,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus-sum)
(require 'mm-util)
(require 'mm-decode)
diff --git a/lisp/gnus/mm-url.el b/lisp/gnus/mm-url.el
index 1715097d4f8..1008c60a173 100644
--- a/lisp/gnus/mm-url.el
+++ b/lisp/gnus/mm-url.el
@@ -28,7 +28,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'mm-util)
(require 'gnus)
@@ -318,7 +318,7 @@ If FOLLOW-REFRESH is non-nil, redirect refresh url in META."
(done nil)
(first t)
result)
- (while (and (not (zerop (decf times)))
+ (while (and (not (zerop (cl-decf times)))
(not done))
(with-timeout (mm-url-timeout)
(unless first
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
index e15eba75924..cf6d6d17ed5 100644
--- a/lisp/gnus/mm-uu.el
+++ b/lisp/gnus/mm-uu.el
@@ -24,7 +24,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
(require 'mail-parse)
(require 'nnheader)
(require 'mm-decode)
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index c11af7060b7..75786cd71b8 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -22,7 +22,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'mail-parse)
(require 'mailcap)
(require 'mm-bodies)
@@ -561,7 +561,7 @@ If MODE is not set, try to find mode automatically."
(error "Could not identify PKCS#7 type")))))
(defun mm-view-pkcs7 (handle &optional from)
- (case (mm-view-pkcs7-get-type handle)
+ (cl-case (mm-view-pkcs7-get-type handle)
(enveloped (mm-view-pkcs7-decrypt handle from))
(signed (mm-view-pkcs7-verify handle))
(otherwise (error "Unknown or unimplemented PKCS#7 type"))))
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el
index f91aa140e7b..9df33d09377 100644
--- a/lisp/gnus/mml-smime.el
+++ b/lisp/gnus/mml-smime.el
@@ -24,7 +24,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'smime)
(require 'mm-decode)
@@ -238,7 +238,7 @@ Whether the passphrase is cached at all is controlled by
;; todo: try dns/ldap automatically first, before prompting user
(let (certs done)
(while (not done)
- (ecase (read (gnus-completing-read
+ (cl-ecase (read (gnus-completing-read
"Fetch certificate from"
'("dns" "ldap" "file") t nil nil
"ldap"))
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 38be0dc4e4c..9fd72a93d5b 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -27,7 +27,7 @@
(require 'mm-encode)
(require 'mm-decode)
(require 'mml-sec)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(eval-when-compile (require 'url))
(autoload 'message-make-message-id "message")
@@ -798,12 +798,12 @@ be \"related\" or \"alternate\"."
(if (setq recipients (cdr (assq 'recipients cont)))
(message-options-set 'message-recipients recipients))
(let ((style (mml-signencrypt-style
- (first (or sign-item encrypt-item)))))
+ (car (or sign-item encrypt-item)))))
;; check if: we're both signing & encrypting, both methods
;; are the same (why would they be different?!), and that
;; the signencrypt style allows for combined operation.
- (if (and sign-item encrypt-item (equal (first sign-item)
- (first encrypt-item))
+ (if (and sign-item encrypt-item (equal (car sign-item)
+ (car encrypt-item))
(equal style 'combined))
(funcall (nth 1 encrypt-item) cont t)
;; otherwise, revert to the old behavior.
@@ -815,7 +815,7 @@ be \"related\" or \"alternate\"."
(defun mml-compute-boundary (cont)
"Return a unique boundary that does not exist in CONT."
(let ((mml-boundary (funcall mml-boundary-function
- (incf mml-multipart-number))))
+ (cl-incf mml-multipart-number))))
(unless mml-inhibit-compute-boundary
;; This function tries again and again until it has found
;; a unique boundary.
@@ -835,7 +835,7 @@ be \"related\" or \"alternate\"."
(when (re-search-forward (concat "^--" (regexp-quote mml-boundary))
nil t)
(setq mml-boundary (funcall mml-boundary-function
- (incf mml-multipart-number)))
+ (cl-incf mml-multipart-number)))
(throw 'not-unique nil))))
((eq (car cont) 'multipart)
(mapc 'mml-compute-boundary-1 (cddr cont))))
diff --git a/lisp/gnus/mml1991.el b/lisp/gnus/mml1991.el
index 4198f2c0c54..93b1b5049a8 100644
--- a/lisp/gnus/mml1991.el
+++ b/lisp/gnus/mml1991.el
@@ -25,9 +25,7 @@
;;; Code:
-(eval-when-compile
- (require 'cl)
- (require 'mm-util))
+(eval-when-compile (require 'mm-util))
(require 'mm-encode)
(require 'mml-sec)
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el
index b220a960983..5980ddb38fe 100644
--- a/lisp/gnus/mml2015.el
+++ b/lisp/gnus/mml2015.el
@@ -27,7 +27,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'mm-decode)
(require 'mm-util)
(require 'mml)
@@ -237,7 +237,7 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
(setq result
(concat
result
- (case n-slice
+ (cl-case n-slice
(1 slice)
(otherwise (concat " " slice))))))
result))
diff --git a/lisp/gnus/nnagent.el b/lisp/gnus/nnagent.el
index 44b010c29b6..1b2b13ebe4d 100644
--- a/lisp/gnus/nnagent.el
+++ b/lisp/gnus/nnagent.el
@@ -26,7 +26,6 @@
(require 'nnheader)
(require 'nnoo)
-(eval-when-compile (require 'cl))
(require 'gnus-agent)
(require 'nnml)
diff --git a/lisp/gnus/nnbabyl.el b/lisp/gnus/nnbabyl.el
index faa797aae45..9f80a755713 100644
--- a/lisp/gnus/nnbabyl.el
+++ b/lisp/gnus/nnbabyl.el
@@ -35,7 +35,7 @@
5 "Ignore rmail errors from this file, you don't have rmail")))
(require 'nnmail)
(require 'nnoo)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(nnoo-declare nnbabyl)
@@ -103,7 +103,7 @@
(insert ".\n"))
(and (numberp nnmail-large-newsgroup)
(> number nnmail-large-newsgroup)
- (zerop (% (incf count) 20))
+ (zerop (% (cl-incf count) 20))
(nnheader-message 5 "nnbabyl: Receiving headers... %d%%"
(floor (* count 100.0) number))))
diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el
index 04bb3b56530..609d90b1071 100644
--- a/lisp/gnus/nndiary.el
+++ b/lisp/gnus/nndiary.el
@@ -83,7 +83,6 @@
(require 'nnoo)
(require 'nnheader)
(require 'nnmail)
-(eval-when-compile (require 'cl))
(require 'gnus-start)
(require 'gnus-sum)
diff --git a/lisp/gnus/nndir.el b/lisp/gnus/nndir.el
index 28c903cb913..0506bb20ee6 100644
--- a/lisp/gnus/nndir.el
+++ b/lisp/gnus/nndir.el
@@ -28,7 +28,6 @@
(require 'nnmh)
(require 'nnml)
(require 'nnoo)
-(eval-when-compile (require 'cl))
(nnoo-declare nndir
nnml nnmh)
diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el
index 53864d1bc1b..fa3117ae2f3 100644
--- a/lisp/gnus/nndoc.el
+++ b/lisp/gnus/nndoc.el
@@ -33,7 +33,7 @@
(require 'nnoo)
(require 'gnus-util)
(require 'mm-util)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(nnoo-declare nndoc)
@@ -788,7 +788,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 (incf i) p nil nil nil 0) nndoc-dissection-alist)
+ (push (list (cl-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)))
@@ -927,7 +927,7 @@ from the document.")
(and (re-search-backward nndoc-file-end nil t)
(beginning-of-line)))))
(setq body-end (point))
- (push (list (incf i) head-begin head-end body-begin body-end
+ (push (list (cl-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))))
@@ -1040,7 +1040,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 (incf nndoc-mime-split-ordinal)
+ (push (list (cl-incf nndoc-mime-split-ordinal)
head-begin head-end body-begin body-end
(count-lines body-begin body-end)
article-insert summary-insert)
@@ -1078,7 +1078,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" (incf part-counter)))
+ (format "%d" (cl-incf part-counter)))
message-id)))))))))
;;;###autoload
diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el
index e984bcb382a..cee7c92b3f1 100644
--- a/lisp/gnus/nndraft.el
+++ b/lisp/gnus/nndraft.el
@@ -31,7 +31,6 @@
(require 'nnmh)
(require 'nnoo)
(require 'mm-util)
-(eval-when-compile (require 'cl))
;; The nnoo-import at the end, I think.
(declare-function nndraft-request-list "nndraft" (&rest args) t)
diff --git a/lisp/gnus/nneething.el b/lisp/gnus/nneething.el
index 9b6a92f10e7..abd17c55086 100644
--- a/lisp/gnus/nneething.el
+++ b/lisp/gnus/nneething.el
@@ -25,7 +25,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'mailcap)
(require 'nnheader)
@@ -101,7 +101,7 @@ included.")
(nneething-insert-head file)
(insert ".\n"))
- (incf count)
+ (cl-incf count)
(and large
(zerop (% count 20))
diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el
index 565c9856051..826fd8d8552 100644
--- a/lisp/gnus/nnfolder.el
+++ b/lisp/gnus/nnfolder.el
@@ -32,7 +32,6 @@
(require 'message)
(require 'nnmail)
(require 'nnoo)
-(eval-when-compile (require 'cl))
(require 'gnus)
(require 'gnus-util)
(require 'gnus-range)
diff --git a/lisp/gnus/nngateway.el b/lisp/gnus/nngateway.el
index b05c4e88073..8b7898c1893 100644
--- a/lisp/gnus/nngateway.el
+++ b/lisp/gnus/nngateway.el
@@ -24,7 +24,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
(require 'nnoo)
(require 'message)
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el
index 77afb09a2a8..34b4137e935 100644
--- a/lisp/gnus/nnheader.el
+++ b/lisp/gnus/nnheader.el
@@ -26,7 +26,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(defvar nnmail-extra-headers)
(defvar gnus-newsgroup-name)
@@ -237,7 +237,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 (incf nnheader-fake-message-id)))))
+ (int-to-string (cl-incf nnheader-fake-message-id)))))
(defsubst nnheader-fake-message-id-p (id)
(save-match-data ; regular message-id's are <.*>
@@ -612,7 +612,7 @@ the line could be found."
(while (and (eq nnheader-head-chop-length
(nth 1 (mm-insert-file-contents
file nil beg
- (incf beg nnheader-head-chop-length))))
+ (cl-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)))
@@ -784,7 +784,7 @@ If FULL, translate everything."
(when (setq trans (cdr (assq (aref leaf i)
nnheader-file-name-translation-alist)))
(aset leaf i trans))
- (incf i))
+ (cl-incf i))
(concat path leaf))))
(defun nnheader-report (backend &rest args)
@@ -973,7 +973,7 @@ find-file-hook, etc.
(defun nnheader-find-file-noselect (&rest args)
"Open a file with some variables bound.
See `find-file-noselect' for the arguments."
- (letf* ((format-alist nil)
+ (cl-letf* ((format-alist nil)
(auto-mode-alist (mm-auto-mode-alist))
((default-value 'major-mode) 'fundamental-mode)
(enable-local-variables nil)
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index cab1513a164..ffe1a47e932 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -27,7 +27,7 @@
;;; Code:
(eval-when-compile
- (require 'cl)
+ (require 'cl-lib)
(require 'subr-x))
(require 'nnheader)
@@ -144,7 +144,7 @@ textual parts.")
(defvar nnimap-keepalive-timer nil)
(defvar nnimap-process-buffers nil)
-(defstruct nnimap
+(cl-defstruct nnimap
group process commands capabilities select-result newlinep server
last-command-time greeting examined stream-type initial-resync)
@@ -212,12 +212,12 @@ textual parts.")
(defun nnimap-transform-headers ()
(goto-char (point-min))
(let (article lines size string labels)
- (block nil
+ (cl-block nil
(while (not (eobp))
(while (not (looking-at "\\* [0-9]+ FETCH"))
(delete-region (point) (progn (forward-line 1) (point)))
(when (eobp)
- (return)))
+ (cl-return)))
(goto-char (match-end 0))
;; Unfold quoted {number} strings.
(while (re-search-forward
@@ -381,7 +381,7 @@ textual parts.")
(setq nnimap-stream 'ssl))
(let ((stream
(if (eq nnimap-stream 'undecided)
- (loop for type in '(ssl network)
+ (cl-loop for type in '(ssl network)
for stream = (let ((nnimap-stream type))
(nnimap-open-connection-1 buffer))
while (eq stream 'no-connect)
@@ -794,7 +794,7 @@ textual parts.")
(equal id "1")
(string-match nnimap-fetch-partial-articles type))
(push id parts))))
- (incf num)))
+ (cl-incf num)))
(nreverse parts)))
(deffoo nnimap-request-group (group &optional server dont-check info)
@@ -1145,7 +1145,7 @@ If LIMIT, first try to limit the search to the N last articles."
;; Just send all the STORE commands without waiting for
;; response. If they're successful, they're successful.
(dolist (action actions)
- (destructuring-bind (range action marks) action
+ (cl-destructuring-bind (range action marks) action
(let ((flags (nnimap-marks-to-flags marks)))
(when flags
(setq sequence (nnimap-send-command
@@ -1408,7 +1408,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)))
- (incf (nnimap-initial-resync nnimap-object))
+ (cl-incf (nnimap-initial-resync nnimap-object))
(setq start 1))
(push (list (nnimap-send-command "%s %S" command
(utf7-encode group t))
@@ -1472,7 +1472,7 @@ If LIMIT, first try to limit the search to the N last articles."
(nnimap-update-info info marks)))))
(defun nnimap-update-info (info marks)
- (destructuring-bind (existing flags high low uidnext start-article
+ (cl-destructuring-bind (existing flags high low uidnext start-article
permanent-flags uidvalidity
vanished highestmodseq) marks
(cond
@@ -1725,7 +1725,7 @@ If LIMIT, first try to limit the search to the N last articles."
(let (start end articles groups uidnext elems permanent-flags
uidvalidity vanished highestmodseq)
(dolist (elem sequences)
- (destructuring-bind (group-sequence flag-sequence totalp group command)
+ (cl-destructuring-bind (group-sequence flag-sequence totalp group command)
elem
(setq start (point))
(when (and
@@ -1869,7 +1869,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"
- (incf nnimap-sequence)
+ (cl-incf nnimap-sequence)
(apply #'format args)
(if (nnimap-newlinep nnimap-object)
""
@@ -2166,7 +2166,7 @@ Return the server's response to the SELECT or EXAMINE command."
(let ((specs nil)
entry)
(dolist (elem list)
- (destructuring-bind (article spec) elem
+ (cl-destructuring-bind (article spec) elem
(dolist (group (delete nil (mapcar #'car spec)))
(unless (setq entry (assoc group specs))
(push (setq entry (list group)) specs))
@@ -2178,12 +2178,12 @@ Return the server's response to the SELECT or EXAMINE command."
(defun nnimap-transform-split-mail ()
(goto-char (point-min))
(let (article bytes)
- (block nil
+ (cl-block nil
(while (not (eobp))
(while (not (looking-at "\\* [0-9]+ FETCH.+UID \\([0-9]+\\)"))
(delete-region (point) (progn (forward-line 1) (point)))
(when (eobp)
- (return)))
+ (cl-return)))
(setq article (match-string 1)
bytes (nnimap-get-length))
(delete-region (line-beginning-position) (line-end-position))
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index 1462578ec20..9f068285e78 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -24,7 +24,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus) ; for macro gnus-kill-buffer, at least
(require 'nnheader)
@@ -781,7 +781,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)
- (incf count)
+ (cl-incf count)
(setq end (point-max))))
(goto-char end))
count))
@@ -927,7 +927,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))
- (incf count)
+ (cl-incf count)
(nnmail-check-duplication message-id func artnum-func)
(setq end (point-max))))
(goto-char end)))
@@ -980,7 +980,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))
- (incf count)
+ (cl-incf count)
(nnmail-check-duplication message-id func artnum-func junk-func)
(setq end (point-max))))
(goto-char end)
@@ -1836,8 +1836,8 @@ be called once per group or once for all groups."
((error quit)
(message "Mail source %s failed: %s" source cond)
0)))
- (incf total new)
- (incf i)))
+ (cl-incf total new)
+ (cl-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 dc97b32f0bb..d5cfa27c21a 100644
--- a/lisp/gnus/nnmaildir.el
+++ b/lisp/gnus/nnmaildir.el
@@ -68,8 +68,7 @@
(require 'message)
(require 'nnmail)
-(eval-when-compile
- (require 'cl))
+(eval-when-compile (require 'cl-lib))
(defconst nnmaildir-version "Gnus")
@@ -165,14 +164,14 @@ This variable is set by `nnmaildir-request-article'.")
(defmacro nnmaildir--nov-set-mtime (nov value) `(aset ,nov 3 ,value))
(defmacro nnmaildir--nov-set-extra (nov value) `(aset ,nov 4 ,value))
-(defstruct nnmaildir--art
+(cl-defstruct nnmaildir--art
(prefix nil :type string) ;; "time.pid.host"
(suffix nil :type string) ;; ":2,flags"
(num nil :type natnum) ;; article number
(msgid nil :type string) ;; "<mess.age@id>"
(nov nil :type vector)) ;; cached nov structure, or nil
-(defstruct nnmaildir--grp
+(cl-defstruct nnmaildir--grp
(name nil :type string) ;; "group.name"
(new nil :type list) ;; new/ modtime
(cur nil :type list) ;; cur/ modtime
@@ -186,7 +185,7 @@ This variable is set by `nnmaildir-request-article'.")
(mmth nil :type vector)) ;; obarray mapping mark name->dir modtime
; ("Mark Mod Time Hash")
-(defstruct nnmaildir--srv
+(cl-defstruct nnmaildir--srv
(address nil :type string) ;; server address string
(method nil :type list) ;; (nnmaildir "address" ...)
(prefix nil :type string) ;; "nnmaildir+address:"
@@ -856,7 +855,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)))
- (incf num)))))
+ (cl-incf num)))))
(setf (nnmaildir--grp-cache group) (make-vector num nil))
(let ((inhibit-quit t))
(set (intern gname groups) group))
@@ -1732,7 +1731,7 @@ This variable is set by `nnmaildir-request-article'.")
(setq ranges (car action)
todo-marks (caddr action))
(dolist (mark todo-marks)
- (pushnew mark all-marks :test #'equal))
+ (cl-pushnew mark all-marks :test #'equal))
(if (numberp (cdr ranges)) (setq ranges (list ranges)))
(nnmaildir--nlist-iterate nlist ranges
(cond ((eq 'del (cadr action)) del-action)
diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el
index 3a0035a3116..24188f5c740 100644
--- a/lisp/gnus/nnmairix.el
+++ b/lisp/gnus/nnmairix.el
@@ -134,8 +134,6 @@
;;; Code:
-(eval-when-compile (require 'cl)) ;For (pop (cdr ogroup)).
-
(require 'nnoo)
(require 'gnus-group)
(require 'gnus-sum)
diff --git a/lisp/gnus/nnmbox.el b/lisp/gnus/nnmbox.el
index 57d8d2125f5..05342dae001 100644
--- a/lisp/gnus/nnmbox.el
+++ b/lisp/gnus/nnmbox.el
@@ -33,7 +33,6 @@
(require 'nnmail)
(require 'nnoo)
(require 'gnus-range)
-(eval-when-compile (require 'cl))
(nnoo-declare nnmbox)
diff --git a/lisp/gnus/nnmh.el b/lisp/gnus/nnmh.el
index b8dd3835520..ea07ad75198 100644
--- a/lisp/gnus/nnmh.el
+++ b/lisp/gnus/nnmh.el
@@ -33,7 +33,6 @@
(require 'nnmail)
(require 'gnus-start)
(require 'nnoo)
-(eval-when-compile (require 'cl))
(nnoo-declare nnmh)
diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el
index a1b7d417ab4..6307e132187 100644
--- a/lisp/gnus/nnml.el
+++ b/lisp/gnus/nnml.el
@@ -35,7 +35,6 @@
(require 'nnheader)
(require 'nnmail)
(require 'nnoo)
-(eval-when-compile (require 'cl))
;; FIXME first is unused in this file.
(autoload 'gnus-article-unpropagatable-p "gnus-sum")
diff --git a/lisp/gnus/nnoo.el b/lisp/gnus/nnoo.el
index 6a61d3d09f2..1e69af65a3b 100644
--- a/lisp/gnus/nnoo.el
+++ b/lisp/gnus/nnoo.el
@@ -25,7 +25,7 @@
;;; Code:
(require 'nnheader)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(defvar nnoo-definition-alist nil)
(defvar nnoo-state-alist nil)
@@ -142,7 +142,7 @@
(if (numberp (nth i (cdr m)))
(push `(nth ,i args) margs)
(push (nth i (cdr m)) margs))
- (incf i))
+ (cl-incf i))
(eval `(deffoo ,(nnoo-symbol backend (nnoo-rest-symbol (car m)))
(&rest args)
(nnoo-parent-function ',backend ',(car m)
diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el
index a04ede67844..c38f7eb79b9 100644
--- a/lisp/gnus/nnrss.el
+++ b/lisp/gnus/nnrss.el
@@ -24,7 +24,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'nnoo)
@@ -355,8 +355,8 @@ for decoding when the cdr that the data specify is not available.")
(with-current-buffer nntp-server-buffer
(erase-buffer)
(dolist (elem nnrss-group-alist)
- (if (third elem)
- (insert (car elem) "\t" (third elem) "\n"))))
+ (if (nth 2 elem)
+ (insert (car elem) "\t" (nth 2 elem) "\n"))))
t)
(deffoo nnrss-retrieve-groups (groups &optional server)
@@ -645,7 +645,7 @@ which RSS 2.0 allows."
nnrss-directory))))
(setq xml (nnrss-fetch file t))
(setq url (or (nth 2 (assoc group nnrss-server-data))
- (second (assoc group nnrss-group-alist))))
+ (cadr (assoc group nnrss-group-alist))))
(unless url
(setq url
(cdr
@@ -691,7 +691,7 @@ which RSS 2.0 allows."
(if (and len (integerp (setq len (string-to-number len))))
;; actually already in `ls-lisp-format-file-size' but
;; probably not worth to require it for one function
- (do ((size (/ len 1.0) (/ size 1024.0))
+ (cl-do ((size (/ len 1.0) (/ size 1024.0))
(post-fixes (list "" "k" "M" "G" "T" "P" "E")
(cdr post-fixes)))
((< size 1024)
@@ -705,7 +705,7 @@ which RSS 2.0 allows."
(setq enclosure (list url name len type))))
(push
(list
- (incf nnrss-group-max)
+ (cl-incf nnrss-group-max)
(current-time)
url
(and subject (nnrss-mime-encode-string subject))
@@ -792,7 +792,7 @@ It is useful when `(setq nnrss-use-local t)'."
(insert "RSSDIR='" (expand-file-name nnrss-directory) "'\n")
(dolist (elem nnrss-server-data)
(let ((url (or (nth 2 elem)
- (second (assoc (car elem) nnrss-group-alist)))))
+ (cadr (assoc (car elem) nnrss-group-alist)))))
(insert "$WGET -q -O \"$RSSDIR\"/'"
(nnrss-translate-file-chars (concat (car elem) ".xml"))
"' '" url "'\n"))))
diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el
index c3fc25047b0..128ce7cac66 100644
--- a/lisp/gnus/nnspool.el
+++ b/lisp/gnus/nnspool.el
@@ -29,7 +29,7 @@
(require 'nnheader)
(require 'nntp)
(require 'nnoo)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
;; Probably this entire thing should be obsolete.
;; It's only used to init nnspool-spool-directory, so why not just
@@ -172,7 +172,7 @@ there.")
(delete-region (point) (point-max)))
(and do-message
- (zerop (% (incf count) 20))
+ (zerop (% (cl-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 d0d13849370..5291919bab5 100644
--- a/lisp/gnus/nntp.el
+++ b/lisp/gnus/nntp.el
@@ -33,7 +33,7 @@
(nnoo-declare nntp)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(autoload 'auth-source-search "auth-source")
@@ -565,7 +565,7 @@ retried once before actually displaying the error report."
(nntp-find-connection-buffer nntp-server-buffer)))
(nntp-encode-text)
;; Make sure we did not forget to encode some of the content.
- (assert (save-excursion (goto-char (point-min))
+ (cl-assert (save-excursion (goto-char (point-min))
(not (re-search-forward "[^\000-\377]" nil t))))
(mm-disable-multibyte)
(process-send-region (nntp-find-connection nntp-server-buffer)
@@ -701,7 +701,7 @@ command whose response triggered the error."
;; `articles' is either a list of article numbers
;; or a list of article IDs.
article))
- (incf count)
+ (cl-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.
@@ -713,7 +713,7 @@ command whose response triggered the error."
;; Count replies.
(while (nntp-next-result-arrived-p)
(setq last-point (point))
- (incf received))
+ (cl-incf received))
(< received count))
;; If number of headers is greater than 100, give
;; informative messages.
@@ -786,7 +786,7 @@ command whose response triggered the error."
"^[.]"
"^[0-9]")
nil t)
- (incf received))
+ (cl-incf received))
(setq last-point (point))
(< received count)))
(nntp-accept-response))
@@ -851,7 +851,7 @@ command whose response triggered the error."
(throw 'done nil))
;; Send the command to the server.
(nntp-send-command nil command (pop groups))
- (incf count)
+ (cl-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.
@@ -865,7 +865,7 @@ command whose response triggered the error."
(goto-char last-point)
;; Count replies.
(while (re-search-forward "^[0-9]" nil t)
- (incf received))
+ (cl-incf received))
(setq last-point (point))
(< received count)))
(nntp-accept-response))))
@@ -937,7 +937,7 @@ command whose response triggered the error."
;; `articles' is either a list of article numbers
;; or a list of article IDs.
article))
- (incf count)
+ (cl-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.
@@ -950,7 +950,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))
- (incf received))
+ (cl-incf received))
(< received count))
;; If number of headers is greater than 100, give
;; informative messages.
@@ -1572,7 +1572,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)
- (incf received)
+ (cl-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 397d44ee2ac..777c5c1bbe0 100644
--- a/lisp/gnus/nnvirtual.el
+++ b/lisp/gnus/nnvirtual.el
@@ -38,7 +38,7 @@
(require 'gnus-start)
(require 'gnus-sum)
(require 'gnus-msg)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(nnoo-declare nnvirtual)
@@ -774,13 +774,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 (<= (incf i) nnvirtual-mapping-len)
+ (while (and (<= (cl-incf i) nnvirtual-mapping-len)
unreads)
(if (= i (car unreads))
(setq unreads (cdr unreads))
;; try to get a range.
(setq beg i)
- (while (and (<= (incf i) nnvirtual-mapping-len)
+ (while (and (<= (cl-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 cac2dae8ebb..3b63e71dcd1 100644
--- a/lisp/gnus/nnweb.el
+++ b/lisp/gnus/nnweb.el
@@ -24,7 +24,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'nnoo)
(require 'message)
@@ -33,9 +33,7 @@
(require 'nnmail)
(require 'mm-util)
(require 'mm-url)
-(eval-and-compile
- (ignore-errors
- (require 'url)))
+(require 'url)
(nnoo-declare nnweb)
@@ -362,11 +360,11 @@ Valid types include `google', `dejanews', and `gmane'.")
(current-time-string)))
(setq From (match-string 4)))
(widen)
- (incf i)
+ (cl-incf i)
(unless (nnweb-get-hashtb url)
(push
(list
- (incf (cdr active))
+ (cl-incf (cdr active))
(make-full-mail-header
(cdr active) (if Newsgroups
(concat "(" Newsgroups ") " Subject)
@@ -398,7 +396,7 @@ Valid types include `google', `dejanews', and `gmane'.")
(nconc nnweb-articles (nnweb-google-parse-1)))
;; Check if there are more articles to fetch
(goto-char (point-min))
- (incf i 100)
+ (cl-incf i 100)
(if (or (not (re-search-forward
"<a [^>]+href=\"\n?\\([^>\" \n\t]+\\)[^<]*<img[^>]+src=[^>]+next"
nil t))
@@ -478,7 +476,7 @@ Valid types include `google', `dejanews', and `gmane'.")
(rfc2047-encode-string subject))
(unless (nnweb-get-hashtb (mail-header-xref header))
- (mail-header-set-number header (incf (cdr active)))
+ (mail-header-set-number header (cl-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/score-mode.el b/lisp/gnus/score-mode.el
index 0ac56a9a3d9..9bceb4ead90 100644
--- a/lisp/gnus/score-mode.el
+++ b/lisp/gnus/score-mode.el
@@ -24,7 +24,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
(require 'mm-util) ; for mm-universal-coding-system
(require 'gnus-util) ; for gnus-pp, gnus-run-mode-hooks
diff --git a/lisp/gnus/smiley.el b/lisp/gnus/smiley.el
index 389ae67d1a4..226a4cecdcb 100644
--- a/lisp/gnus/smiley.el
+++ b/lisp/gnus/smiley.el
@@ -47,7 +47,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
(require 'nnheader)
(require 'gnus-art)
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el
index 97e63404c4f..710e0e83cf9 100644
--- a/lisp/gnus/spam.el
+++ b/lisp/gnus/spam.el
@@ -38,8 +38,6 @@
;;{{{ compilation directives and autoloads/requires
-(eval-when-compile (require 'cl))
-
(require 'message) ;for the message-fetch-field functions
(require 'gnus-sum)
(require 'gnus-uu) ; because of key prefix issues
@@ -51,6 +49,8 @@
;; for nnimap-split-download-body-default
(eval-when-compile (require 'nnimap))
+(eval-when-compile (require 'cl-lib))
+
;; autoload query-dig
(autoload 'query-dig "dig")
@@ -1164,12 +1164,12 @@ backends)."
(defun spam-article-sort-by-spam-status (h1 h2)
"Sort articles by score."
(let (result)
- (dolist (header (spam-necessary-extra-headers))
+ (cl-dolist (header (spam-necessary-extra-headers))
(let ((s1 (spam-summary-score h1 header))
(s2 (spam-summary-score h2 header)))
(unless (= s1 s2)
(setq result (< s1 s2))
- (return))))
+ (cl-return))))
result))
(defvar spam-spamassassin-score-regexp
@@ -1205,14 +1205,14 @@ Note this has to be fast."
With SPECIFIC-HEADER, returns only that header's score.
Will not return a nil score."
(let (score)
- (dolist (header
+ (cl-dolist (header
(if specific-header
(list specific-header)
(spam-necessary-extra-headers)))
(setq score
(spam-extra-header-to-number header headers))
(when score
- (return)))
+ (cl-return)))
(or score 0)))
(defun spam-generic-score (&optional recheck)
@@ -1661,10 +1661,10 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
article-cannot-be-faked)
- (dolist (backend methods)
+ (cl-dolist (backend methods)
(when (spam-backend-statistical-p backend)
(setq article-cannot-be-faked t)
- (return)))
+ (cl-return)))
(when (memq 'default methods)
(setq article-cannot-be-faked t))
@@ -1749,7 +1749,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
;; eliminate duplicates
(dolist (article (copy-sequence ulist))
(when (memq article rlist)
- (incf delcount)
+ (cl-incf delcount)
(setq rlist (delq article rlist))
(setq ulist (delq article ulist))))
@@ -2299,10 +2299,10 @@ With a non-nil REMOVE, remove the ADDRESSES."
(when (stringp from)
(spam-filelist-build-cache type)
(let (found)
- (dolist (address (gethash type spam-caches))
+ (cl-dolist (address (gethash type spam-caches))
(when (and address (string-match address from))
(setq found t)
- (return)))
+ (cl-return)))
found)))
;;; returns t if the sender is in the whitelist, nil or