Commit bfcff8f8 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Mark nnheader-cancel-timer as obsolete and adjust callers

* lisp/gnus/nnheader.el (nnheader-cancel-timer)
(nnheader-cancel-function-timers): Mark as obsolete.

* lisp/gnus/nntp.el (nntp-with-open-group-function)
(nntp-async-stop): Adjust caller.

* lisp/gnus/gnus-art.el (gnus-stop-date-timer): Ditto.

* lisp/gnus/gnus-async.el (gnus-async-prefetch-next): Ditto.

* lisp/gnus/gnus-demon.el (gnus-demon-run-callback)
(gnus-demon-cancel): Ditto.

* lisp/gnus/mail-source.el (mail-source-report-new-mail): Ditto.

* lisp/gnus/nnmaildir.el (nnmaildir-request-accept-article): Ditto.
parent b552fc05
Pipeline #1753 failed with stage
in 6 minutes and 26 seconds
......@@ -3733,7 +3733,7 @@ is to run."
"Stop the Date timer."
(when article-lapsed-timer
(nnheader-cancel-timer article-lapsed-timer)
(cancel-timer article-lapsed-timer)
(setq article-lapsed-timer nil)))
(defun article-date-user (&optional highlight)
......@@ -146,7 +146,7 @@ that was fetched."
(when next
(when gnus-async-timer
(nnheader-cancel-timer 'gnus-async-timer)))
(cancel-timer 'gnus-async-timer)))
(setq gnus-async-timer
0.1 nil 'gnus-async-prefetch-article
......@@ -111,7 +111,7 @@ marked with SPECIAL."
func idle time))))
((and idle (> idle (gnus-demon-idle-since)))
(when time
(nnheader-cancel-timer (plist-get gnus-demon-timers func))
(cancel-timer (plist-get gnus-demon-timers func))
(setq gnus-demon-timers
(plist-put gnus-demon-timers func
(run-with-idle-timer idle nil
......@@ -202,7 +202,7 @@ marked with SPECIAL."
"Cancel any Gnus daemons."
(dotimes (i (/ (length gnus-demon-timers) 2))
(nnheader-cancel-timer (nth (1+ (* i 2)) gnus-demon-timers)))
(cancel-timer (nth (1+ (* i 2)) gnus-demon-timers)))
(setq gnus-demon-timers nil))
(defun gnus-demon-add-disconnection ()
......@@ -31,7 +31,6 @@
(autoload 'auth-source-search "auth-source")
(autoload 'pop3-movemail "pop3")
(autoload 'pop3-get-message-count "pop3")
(autoload 'nnheader-cancel-timer "nnheader")
(require 'mm-util)
(require 'message) ;; for `message-directory'
......@@ -989,9 +988,9 @@ This only works when `display-time' is enabled."
(> (prefix-numeric-value arg) 0))))
(setq mail-source-report-new-mail on)
(and mail-source-report-new-mail-timer
(nnheader-cancel-timer mail-source-report-new-mail-timer))
(cancel-timer mail-source-report-new-mail-timer))
(and mail-source-report-new-mail-idle-timer
(nnheader-cancel-timer mail-source-report-new-mail-idle-timer))
(cancel-timer mail-source-report-new-mail-idle-timer))
(setq mail-source-report-new-mail-timer nil)
(setq mail-source-report-new-mail-idle-timer nil)
(if on
......@@ -970,7 +970,11 @@ See `find-file-noselect' for the arguments."
(nnheader-skeleton-replace "\r"))
(defalias 'nnheader-cancel-timer 'cancel-timer)
(define-obsolete-function-alias 'nnheader-cancel-timer 'cancel-timer "27.1")
(defalias 'nnheader-cancel-function-timers 'cancel-function-timers)
(define-obsolete-function-alias 'nnheader-cancel-function-timers
'cancel-function-timers "27.1")
;; When changing this function, consider changing `pop3-accept-process-output'
;; as well.
......@@ -1490,7 +1490,7 @@ This variable is set by `nnmaildir-request-article'.")
(when (fboundp 'unix-sync)
(unix-sync)))) ;; no fsync :(
(nnheader-cancel-timer 24h)
(cancel-timer 24h)
(condition-case err
(add-name-to-file tmpfile curfile)
......@@ -647,7 +647,7 @@ command whose response triggered the error."
(signal 'quit nil))))
(when -timer
(nnheader-cancel-timer -timer)))
(cancel-timer -timer)))
(setq nntp--report-1 nntp-report-n))
......@@ -1280,7 +1280,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the
(signal 'quit nil)
(when timer
(nnheader-cancel-timer timer))
(cancel-timer timer))
(when (and process
(not (memq (process-status process) '(open run))))
(with-current-buffer pbuffer
......@@ -1339,7 +1339,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the
(defun nntp-async-stop (proc)
(setq nntp-async-process-list (delq proc nntp-async-process-list))
(when (and nntp-async-timer (not nntp-async-process-list))
(nnheader-cancel-timer nntp-async-timer)
(cancel-timer nntp-async-timer)
(setq nntp-async-timer nil)))
(defun nntp-after-change-function (beg end len)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment