diff options
| author | Lars Ingebrigtsen | 2019-05-20 13:47:16 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-05-20 13:47:53 +0200 |
| commit | bfcff8f88a472bd1a64922da094cd007d3b7a70a (patch) | |
| tree | bca1e5a94394de38a784f2104c0b9478d6a8610f | |
| parent | b552fc05c231ca6800330a318d3a74ddd0f5a13c (diff) | |
| download | emacs-bfcff8f88a472bd1a64922da094cd007d3b7a70a.tar.gz emacs-bfcff8f88a472bd1a64922da094cd007d3b7a70a.zip | |
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.
| -rw-r--r-- | lisp/gnus/gnus-art.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-async.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-demon.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/mail-source.el | 5 | ||||
| -rw-r--r-- | lisp/gnus/nnheader.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/nnmaildir.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nntp.el | 6 |
7 files changed, 14 insertions, 11 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index baa8a244c07..a1b82f8aab4 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -3733,7 +3733,7 @@ is to run." | |||
| 3733 | "Stop the Date timer." | 3733 | "Stop the Date timer." |
| 3734 | (interactive) | 3734 | (interactive) |
| 3735 | (when article-lapsed-timer | 3735 | (when article-lapsed-timer |
| 3736 | (nnheader-cancel-timer article-lapsed-timer) | 3736 | (cancel-timer article-lapsed-timer) |
| 3737 | (setq article-lapsed-timer nil))) | 3737 | (setq article-lapsed-timer nil))) |
| 3738 | 3738 | ||
| 3739 | (defun article-date-user (&optional highlight) | 3739 | (defun article-date-user (&optional highlight) |
diff --git a/lisp/gnus/gnus-async.el b/lisp/gnus/gnus-async.el index 4e2723e8d27..b3da3505da8 100644 --- a/lisp/gnus/gnus-async.el +++ b/lisp/gnus/gnus-async.el | |||
| @@ -146,7 +146,7 @@ that was fetched." | |||
| 146 | (when next | 146 | (when next |
| 147 | (when gnus-async-timer | 147 | (when gnus-async-timer |
| 148 | (ignore-errors | 148 | (ignore-errors |
| 149 | (nnheader-cancel-timer 'gnus-async-timer))) | 149 | (cancel-timer 'gnus-async-timer))) |
| 150 | (setq gnus-async-timer | 150 | (setq gnus-async-timer |
| 151 | (run-with-idle-timer | 151 | (run-with-idle-timer |
| 152 | 0.1 nil 'gnus-async-prefetch-article | 152 | 0.1 nil 'gnus-async-prefetch-article |
diff --git a/lisp/gnus/gnus-demon.el b/lisp/gnus/gnus-demon.el index 6c5e0b7f5d0..cb70d9525c2 100644 --- a/lisp/gnus/gnus-demon.el +++ b/lisp/gnus/gnus-demon.el | |||
| @@ -111,7 +111,7 @@ marked with SPECIAL." | |||
| 111 | func idle time)))) | 111 | func idle time)))) |
| 112 | ((and idle (> idle (gnus-demon-idle-since))) | 112 | ((and idle (> idle (gnus-demon-idle-since))) |
| 113 | (when time | 113 | (when time |
| 114 | (nnheader-cancel-timer (plist-get gnus-demon-timers func)) | 114 | (cancel-timer (plist-get gnus-demon-timers func)) |
| 115 | (setq gnus-demon-timers | 115 | (setq gnus-demon-timers |
| 116 | (plist-put gnus-demon-timers func | 116 | (plist-put gnus-demon-timers func |
| 117 | (run-with-idle-timer idle nil | 117 | (run-with-idle-timer idle nil |
| @@ -202,7 +202,7 @@ marked with SPECIAL." | |||
| 202 | "Cancel any Gnus daemons." | 202 | "Cancel any Gnus daemons." |
| 203 | (interactive) | 203 | (interactive) |
| 204 | (dotimes (i (/ (length gnus-demon-timers) 2)) | 204 | (dotimes (i (/ (length gnus-demon-timers) 2)) |
| 205 | (nnheader-cancel-timer (nth (1+ (* i 2)) gnus-demon-timers))) | 205 | (cancel-timer (nth (1+ (* i 2)) gnus-demon-timers))) |
| 206 | (setq gnus-demon-timers nil)) | 206 | (setq gnus-demon-timers nil)) |
| 207 | 207 | ||
| 208 | (defun gnus-demon-add-disconnection () | 208 | (defun gnus-demon-add-disconnection () |
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index 7514e64e7c2..9d70bd5afa9 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el | |||
| @@ -31,7 +31,6 @@ | |||
| 31 | (autoload 'auth-source-search "auth-source") | 31 | (autoload 'auth-source-search "auth-source") |
| 32 | (autoload 'pop3-movemail "pop3") | 32 | (autoload 'pop3-movemail "pop3") |
| 33 | (autoload 'pop3-get-message-count "pop3") | 33 | (autoload 'pop3-get-message-count "pop3") |
| 34 | (autoload 'nnheader-cancel-timer "nnheader") | ||
| 35 | (require 'mm-util) | 34 | (require 'mm-util) |
| 36 | (require 'message) ;; for `message-directory' | 35 | (require 'message) ;; for `message-directory' |
| 37 | 36 | ||
| @@ -989,9 +988,9 @@ This only works when `display-time' is enabled." | |||
| 989 | (> (prefix-numeric-value arg) 0)))) | 988 | (> (prefix-numeric-value arg) 0)))) |
| 990 | (setq mail-source-report-new-mail on) | 989 | (setq mail-source-report-new-mail on) |
| 991 | (and mail-source-report-new-mail-timer | 990 | (and mail-source-report-new-mail-timer |
| 992 | (nnheader-cancel-timer mail-source-report-new-mail-timer)) | 991 | (cancel-timer mail-source-report-new-mail-timer)) |
| 993 | (and mail-source-report-new-mail-idle-timer | 992 | (and mail-source-report-new-mail-idle-timer |
| 994 | (nnheader-cancel-timer mail-source-report-new-mail-idle-timer)) | 993 | (cancel-timer mail-source-report-new-mail-idle-timer)) |
| 995 | (setq mail-source-report-new-mail-timer nil) | 994 | (setq mail-source-report-new-mail-timer nil) |
| 996 | (setq mail-source-report-new-mail-idle-timer nil) | 995 | (setq mail-source-report-new-mail-idle-timer nil) |
| 997 | (if on | 996 | (if on |
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index 2686cf93055..bb870746d7e 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el | |||
| @@ -970,7 +970,11 @@ See `find-file-noselect' for the arguments." | |||
| 970 | (nnheader-skeleton-replace "\r")) | 970 | (nnheader-skeleton-replace "\r")) |
| 971 | 971 | ||
| 972 | (defalias 'nnheader-cancel-timer 'cancel-timer) | 972 | (defalias 'nnheader-cancel-timer 'cancel-timer) |
| 973 | (define-obsolete-function-alias 'nnheader-cancel-timer 'cancel-timer "27.1") | ||
| 974 | |||
| 973 | (defalias 'nnheader-cancel-function-timers 'cancel-function-timers) | 975 | (defalias 'nnheader-cancel-function-timers 'cancel-function-timers) |
| 976 | (define-obsolete-function-alias 'nnheader-cancel-function-timers | ||
| 977 | 'cancel-function-timers "27.1") | ||
| 974 | 978 | ||
| 975 | ;; When changing this function, consider changing `pop3-accept-process-output' | 979 | ;; When changing this function, consider changing `pop3-accept-process-output' |
| 976 | ;; as well. | 980 | ;; as well. |
diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index 9d02773d6f2..ac125c905a5 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el | |||
| @@ -1490,7 +1490,7 @@ This variable is set by `nnmaildir-request-article'.") | |||
| 1490 | 'excl) | 1490 | 'excl) |
| 1491 | (when (fboundp 'unix-sync) | 1491 | (when (fboundp 'unix-sync) |
| 1492 | (unix-sync)))) ;; no fsync :( | 1492 | (unix-sync)))) ;; no fsync :( |
| 1493 | (nnheader-cancel-timer 24h) | 1493 | (cancel-timer 24h) |
| 1494 | (condition-case err | 1494 | (condition-case err |
| 1495 | (add-name-to-file tmpfile curfile) | 1495 | (add-name-to-file tmpfile curfile) |
| 1496 | (error | 1496 | (error |
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index e2fa1d85a36..0e5057e1a45 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el | |||
| @@ -647,7 +647,7 @@ command whose response triggered the error." | |||
| 647 | (nntp-close-server)) | 647 | (nntp-close-server)) |
| 648 | (signal 'quit nil)))) | 648 | (signal 'quit nil)))) |
| 649 | (when -timer | 649 | (when -timer |
| 650 | (nnheader-cancel-timer -timer))) | 650 | (cancel-timer -timer))) |
| 651 | nil)) | 651 | nil)) |
| 652 | (setq nntp--report-1 nntp-report-n)) | 652 | (setq nntp--report-1 nntp-report-n)) |
| 653 | nntp-with-open-group-internal)) | 653 | nntp-with-open-group-internal)) |
| @@ -1280,7 +1280,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the | |||
| 1280 | (signal 'quit nil) | 1280 | (signal 'quit nil) |
| 1281 | nil)))) | 1281 | nil)))) |
| 1282 | (when timer | 1282 | (when timer |
| 1283 | (nnheader-cancel-timer timer)) | 1283 | (cancel-timer timer)) |
| 1284 | (when (and process | 1284 | (when (and process |
| 1285 | (not (memq (process-status process) '(open run)))) | 1285 | (not (memq (process-status process) '(open run)))) |
| 1286 | (with-current-buffer pbuffer | 1286 | (with-current-buffer pbuffer |
| @@ -1339,7 +1339,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the | |||
| 1339 | (defun nntp-async-stop (proc) | 1339 | (defun nntp-async-stop (proc) |
| 1340 | (setq nntp-async-process-list (delq proc nntp-async-process-list)) | 1340 | (setq nntp-async-process-list (delq proc nntp-async-process-list)) |
| 1341 | (when (and nntp-async-timer (not nntp-async-process-list)) | 1341 | (when (and nntp-async-timer (not nntp-async-process-list)) |
| 1342 | (nnheader-cancel-timer nntp-async-timer) | 1342 | (cancel-timer nntp-async-timer) |
| 1343 | (setq nntp-async-timer nil))) | 1343 | (setq nntp-async-timer nil))) |
| 1344 | 1344 | ||
| 1345 | (defun nntp-after-change-function (beg end len) | 1345 | (defun nntp-after-change-function (beg end len) |