;;; Code:
-(eval-when-compile
- (require 'cl))
-
(require 'sha1)
(defvar mail-header-separator)
(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")
`(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)
(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)
'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)
(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)
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
(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)))))))
(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)
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)
;;; Code:
-(eval-when-compile
- (require 'cl))
+(eval-when-compile (require 'cl-lib))
(defvar tool-bar-map)
(defvar w3m-minor-mode-map)
(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)
(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)))))))
(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
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-sum)
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)))
;; 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)
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus)
;;;
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-sum)
(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
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus)
(require 'gnus-range)
(require 'gnus-art)
;;; Code:
-(eval-when-compile (require 'cl))
(require 'parse-time)
(require 'nnimap)
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-int)
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
(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))))))
(require 'gnus-msg)
(require 'nndraft)
(require 'gnus-agent)
-(eval-when-compile (require 'cl))
;;; Draft minor mode
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus)
(require 'gnus-art)
;;; Code:
-(eval-when-compile
- (require 'cl))
-
(require 'mm-util)
(require 'gnus-util)
(require 'gnus)
(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))
(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)
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus-art)
(eval-when-compile (require 'mm-decode))
(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
"\\\\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))
;; 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 .:.
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus)
(require 'message)
(require 'gnus-range)
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus)
(require 'gnus-art)
(require 'gnus-range)
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-score)
(require 'gnus)
(require 'gnus-msg)
-(eval-when-compile (require 'cl))
;;; Mailing list minor mode
;;; Code:
-(eval-when-compile (require 'cl))
(require 'gnus)
(require 'gnus-sum)
(require 'gnus-group)
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'message)
((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))))
;;
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-art)
(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)
;;; Code:
-(eval-when-compile (require 'cl))
-
;;; List and range functions
(defsubst gnus-range-normalize (range)
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(eval-when-compile (require 'subr-x))
(require 'gnus)
(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))
(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)
: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)
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
(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
(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
(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
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)
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
(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)))
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)
(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)
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-sum)
(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.
(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))
(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")))
(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
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-sum)
(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)))))))))
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(defvar gnus-newsrc-file-version)
(require 'gnus)
;; 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))))
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-start)
(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"))
(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)
(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)
;; 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
;; 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
(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)))
;; 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
;; 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
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))))
(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)))
(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 ()
(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)))
(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
(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)
(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")
(let ((num 0))
(while threads
(when (memq (mail-header-number (caar threads)) gnus-newsgroup-limit)
- (incf num))
+ (cl-incf num))
(pop threads))
(< num 2)))
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))
(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))
(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))
(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)
(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)))
(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)
(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))
(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))))))
;; 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)
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)
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-group)
number)
(while entries
(when (numberp (setq number (car (pop entries))))
- (incf total number)))
+ (cl-incf total number)))
total))
(defun gnus-group-topic (group)
(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))
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)))
(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)
(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)))
(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
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus-util)
(require 'gnus)
;;; Code:
-(eval-when-compile
- (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'time-date)
(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
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-art)
(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))
(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)
(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.")
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'gnus-util)
;; 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)))))
((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))
(require 'format-spec)
(eval-when-compile
- (require 'cl)
+ (require 'cl-lib)
(require 'imap))
(autoload 'auth-source-search "auth-source")
(autoload 'pop3-movemail "pop3")
;; 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
(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)))
(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)))
(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))
(require 'mail-parse)
(require 'mm-bodies)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(autoload 'gnus-map-function "gnus-util")
;;; 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")
(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)))
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus-sum)
(require 'mm-util)
(require 'mm-decode)
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'mm-util)
(require 'gnus)
(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
;;; Code:
-(eval-when-compile (require 'cl))
(require 'mail-parse)
(require 'nnheader)
(require 'mm-decode)
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'mail-parse)
(require 'mailcap)
(require 'mm-bodies)
(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"))))
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'smime)
(require 'mm-decode)
;; 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"))
(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")
(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.
(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.
(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))))
;;; Code:
-(eval-when-compile
- (require 'cl)
- (require 'mm-util))
+(eval-when-compile (require 'mm-util))
(require 'mm-encode)
(require 'mml-sec)
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'mm-decode)
(require 'mm-util)
(require 'mml)
(setq result
(concat
result
- (case n-slice
+ (cl-case n-slice
(1 slice)
(otherwise (concat " " slice))))))
result))
(require 'nnheader)
(require 'nnoo)
-(eval-when-compile (require 'cl))
(require 'gnus-agent)
(require 'nnml)
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)
(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))))
(require 'nnoo)
(require 'nnheader)
(require 'nnmail)
-(eval-when-compile (require 'cl))
(require 'gnus-start)
(require 'gnus-sum)
(require 'nnmh)
(require 'nnml)
(require 'nnoo)
-(eval-when-compile (require 'cl))
(nnoo-declare nndir
nnml nnmh)
(require 'nnoo)
(require 'gnus-util)
(require 'mm-util)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(nnoo-declare nndoc)
(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)))
(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))))
(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)
part-begin part-end article-insert
(concat position
(and position ".")
- (format "%d" (incf part-counter)))
+ (format "%d" (cl-incf part-counter)))
message-id)))))))))
;;;###autoload
(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)
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'mailcap)
(require 'nnheader)
(nneething-insert-head file)
(insert ".\n"))
- (incf count)
+ (cl-incf count)
(and large
(zerop (% count 20))
(require 'message)
(require 'nnmail)
(require 'nnoo)
-(eval-when-compile (require 'cl))
(require 'gnus)
(require 'gnus-util)
(require 'gnus-range)
;;; Code:
-(eval-when-compile (require 'cl))
(require 'nnoo)
(require 'message)
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(defvar nnmail-extra-headers)
(defvar gnus-newsgroup-name)
(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 <.*>
(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)))
(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)
(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)
;;; Code:
(eval-when-compile
- (require 'cl)
+ (require 'cl-lib)
(require 'subr-x))
(require 'nnheader)
(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)
(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
(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)
(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)
;; 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
(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))
(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
(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
(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)
""
(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))
(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))
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus) ; for macro gnus-kill-buffer, at least
(require 'nnheader)
(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))
(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)))
(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)
((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
(require 'message)
(require 'nnmail)
-(eval-when-compile
- (require 'cl))
+(eval-when-compile (require 'cl-lib))
(defconst nnmaildir-version "Gnus")
(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
(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:"
;; 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))
(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)
;;; Code:
-(eval-when-compile (require 'cl)) ;For (pop (cdr ogroup)).
-
(require 'nnoo)
(require 'gnus-group)
(require 'gnus-sum)
(require 'nnmail)
(require 'nnoo)
(require 'gnus-range)
-(eval-when-compile (require 'cl))
(nnoo-declare nnmbox)
(require 'nnmail)
(require 'gnus-start)
(require 'nnoo)
-(eval-when-compile (require 'cl))
(nnoo-declare nnmh)
(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")
;;; Code:
(require 'nnheader)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(defvar nnoo-definition-alist nil)
(defvar nnoo-state-alist nil)
(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)
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'gnus)
(require 'nnoo)
(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)
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
(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)
(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))
(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"))))
(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
(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))))
(nnoo-declare nntp)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(autoload 'auth-source-search "auth-source")
(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)
;; `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.
;; 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.
"^[.]"
"^[0-9]")
nil t)
- (incf received))
+ (cl-incf received))
(setq last-point (point))
(< received count)))
(nntp-accept-response))
(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.
(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))))
;; `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.
(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.
;; 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)
(require 'gnus-start)
(require 'gnus-sum)
(require 'gnus-msg)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(nnoo-declare nnvirtual)
;; 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)
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'nnoo)
(require 'message)
(require 'nnmail)
(require 'mm-util)
(require 'mm-url)
-(eval-and-compile
- (ignore-errors
- (require 'url)))
+(require 'url)
(nnoo-declare nnweb)
(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)
(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))
(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)))
;;; Code:
-(eval-when-compile (require 'cl))
(require 'mm-util) ; for mm-universal-coding-system
(require 'gnus-util) ; for gnus-pp, gnus-run-mode-hooks
;;; Code:
-(eval-when-compile (require 'cl))
(require 'nnheader)
(require 'gnus-art)
;;{{{ 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
;; for nnimap-split-download-body-default
(eval-when-compile (require 'nnimap))
+(eval-when-compile (require 'cl-lib))
+
;; autoload query-dig
(autoload 'query-dig "dig")
(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
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)
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))
;; 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))))
(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