]> git.eshelyaron.com Git - emacs.git/commitdiff
Mark nnheader-cancel-timer as obsolete and adjust callers
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 20 May 2019 11:47:16 +0000 (13:47 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 20 May 2019 11:47:53 +0000 (13:47 +0200)
* 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.

lisp/gnus/gnus-art.el
lisp/gnus/gnus-async.el
lisp/gnus/gnus-demon.el
lisp/gnus/mail-source.el
lisp/gnus/nnheader.el
lisp/gnus/nnmaildir.el
lisp/gnus/nntp.el

index baa8a244c07b1ce8c3dd9c18fdd2517b8e4a2bd8..a1b82f8aab4a3aec4de9b99c7b6c6a832ac6b882 100644 (file)
@@ -3733,7 +3733,7 @@ is to run."
   "Stop the Date timer."
   (interactive)
   (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)
index 4e2723e8d2780a05093c24270c619bbff8c478a8..b3da3505da8677204dfcc878ceedf7414ee10ea1 100644 (file)
@@ -146,7 +146,7 @@ that was fetched."
        (when next
          (when gnus-async-timer
            (ignore-errors
-             (nnheader-cancel-timer 'gnus-async-timer)))
+             (cancel-timer 'gnus-async-timer)))
          (setq gnus-async-timer
                (run-with-idle-timer
                 0.1 nil 'gnus-async-prefetch-article
index 6c5e0b7f5d09b195576f0de160d0d8b0817bdae8..cb70d9525c296e257a6a6dcea26be725a5972af3 100644 (file)
@@ -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."
   (interactive)
   (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 ()
index 7514e64e7c2fff801ccfe4bb876ca3b5c6ef8339..9d70bd5afa9b54a1b744577e864243b7135a3e58 100644 (file)
@@ -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
index 2686cf93055ad8f5ec8dad1d6c42d80db3e9130e..bb870746d7e30676ad599ea7af30ca46b99fc535 100644 (file)
@@ -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.
index 9d02773d6f24e0ab414b40bc2553c405c0822fb3..ac125c905a54d72b20a0fd5b31be79732965d997 100644 (file)
@@ -1490,7 +1490,7 @@ This variable is set by `nnmaildir-request-article'.")
                       'excl)
         (when (fboundp 'unix-sync)
           (unix-sync)))) ;; no fsync :(
-      (nnheader-cancel-timer 24h)
+      (cancel-timer 24h)
       (condition-case err
          (add-name-to-file tmpfile curfile)
        (error
index e2fa1d85a36138f259303b2109ef83d7a9bf4104..0e5057e1a45b7d0eab58d3894123ab67a4803b71 100644 (file)
@@ -647,7 +647,7 @@ command whose response triggered the error."
                               (nntp-close-server))
                             (signal 'quit nil))))
                  (when -timer
-                   (nnheader-cancel-timer -timer)))
+                   (cancel-timer -timer)))
                nil))
       (setq nntp--report-1 nntp-report-n))
     nntp-with-open-group-internal))
@@ -1280,7 +1280,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the
             (signal 'quit nil)
             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)