diff options
| author | Paul Eggert | 2019-01-15 14:08:41 -0800 |
|---|---|---|
| committer | Paul Eggert | 2019-01-15 14:09:11 -0800 |
| commit | 2a3bd6798e9670828f0402079fcc116d6d6b042d (patch) | |
| tree | faed45fcd905138435b9100758f5bcc44e60ec3a | |
| parent | 9fc02ff5ea95c31a8d81eabb5634aa135fcd8786 (diff) | |
| download | emacs-2a3bd6798e9670828f0402079fcc116d6d6b042d.tar.gz emacs-2a3bd6798e9670828f0402079fcc116d6d6b042d.zip | |
Avoid using obsolete accept-process-output arg
* lisp/gnus/nnheader.el (nnheader-accept-process-output):
* lisp/net/dns.el (dns-query):
* lisp/net/imap.el (imap-wait-for-tag):
* lisp/net/network-stream.el (network-stream-get-response):
* lisp/net/pop3.el (pop3-accept-process-output):
* lisp/obsolete/starttls.el (starttls-negotiate-gnutls)
(starttls-open-stream-gnutls):
* lisp/server.el (server-eval-at):
* lisp/textmodes/ispell.el (ispell-accept-output):
Do not depend on the obsolete milliseconds argument of
accept-process-output.
| -rw-r--r-- | lisp/gnus/nnheader.el | 7 | ||||
| -rw-r--r-- | lisp/net/dns.el | 5 | ||||
| -rw-r--r-- | lisp/net/imap.el | 2 | ||||
| -rw-r--r-- | lisp/net/network-stream.el | 2 | ||||
| -rw-r--r-- | lisp/net/pop3.el | 7 | ||||
| -rw-r--r-- | lisp/obsolete/starttls.el | 4 | ||||
| -rw-r--r-- | lisp/server.el | 2 | ||||
| -rw-r--r-- | lisp/textmodes/ispell.el | 8 |
8 files changed, 16 insertions, 21 deletions
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index 5addc005600..7c8673ee1c5 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el | |||
| @@ -1042,12 +1042,7 @@ See `find-file-noselect' for the arguments." | |||
| 1042 | ;; When changing this function, consider changing `pop3-accept-process-output' | 1042 | ;; When changing this function, consider changing `pop3-accept-process-output' |
| 1043 | ;; as well. | 1043 | ;; as well. |
| 1044 | (defun nnheader-accept-process-output (process) | 1044 | (defun nnheader-accept-process-output (process) |
| 1045 | (accept-process-output | 1045 | (accept-process-output process nnheader-read-timeout)) |
| 1046 | process | ||
| 1047 | (truncate nnheader-read-timeout) | ||
| 1048 | (truncate (* (- nnheader-read-timeout | ||
| 1049 | (truncate nnheader-read-timeout)) | ||
| 1050 | 1000)))) | ||
| 1051 | 1046 | ||
| 1052 | (defun nnheader-update-marks-actions (backend-marks actions) | 1047 | (defun nnheader-update-marks-actions (backend-marks actions) |
| 1053 | (dolist (action actions) | 1048 | (dolist (action actions) |
diff --git a/lisp/net/dns.el b/lisp/net/dns.el index beae5c10649..4fa87050e57 100644 --- a/lisp/net/dns.el +++ b/lisp/net/dns.el | |||
| @@ -432,8 +432,9 @@ If REVERSEP, look up an IP address." | |||
| 432 | tcp-p)) | 432 | tcp-p)) |
| 433 | (while (and (zerop (buffer-size)) | 433 | (while (and (zerop (buffer-size)) |
| 434 | (> times 0)) | 434 | (> times 0)) |
| 435 | (sit-for (/ step 1000.0)) | 435 | (let ((step-sec (/ step 1000.0))) |
| 436 | (accept-process-output process 0 step) | 436 | (sit-for step-sec) |
| 437 | (accept-process-output process step-sec)) | ||
| 437 | (setq times (- times step))) | 438 | (setq times (- times step))) |
| 438 | (condition-case nil | 439 | (condition-case nil |
| 439 | (delete-process process) | 440 | (delete-process process) |
diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 504900eabe9..0931252c366 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el | |||
| @@ -1929,7 +1929,7 @@ on failure." | |||
| 1929 | ;; iteration of the loop above. | 1929 | ;; iteration of the loop above. |
| 1930 | (when (and (null imap-continuation) | 1930 | (when (and (null imap-continuation) |
| 1931 | (< imap-reached-tag tag)) | 1931 | (< imap-reached-tag tag)) |
| 1932 | (accept-process-output imap-process 0 0)) | 1932 | (accept-process-output imap-process 0)) |
| 1933 | (when imap-have-messaged | 1933 | (when imap-have-messaged |
| 1934 | (message "")) | 1934 | (message "")) |
| 1935 | (and (memq (process-status imap-process) '(open run)) | 1935 | (and (memq (process-status imap-process) '(open run)) |
diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el index 98b20337908..84ba0b85e79 100644 --- a/lisp/net/network-stream.el +++ b/lisp/net/network-stream.el | |||
| @@ -375,7 +375,7 @@ gnutls-boot (as returned by `gnutls-boot-parameters')." | |||
| 375 | (goto-char start) | 375 | (goto-char start) |
| 376 | (while (and (memq (process-status stream) '(open run)) | 376 | (while (and (memq (process-status stream) '(open run)) |
| 377 | (not (re-search-forward end-of-command nil t))) | 377 | (not (re-search-forward end-of-command nil t))) |
| 378 | (accept-process-output stream 0 50) | 378 | (accept-process-output stream 0.05) |
| 379 | (goto-char start)) | 379 | (goto-char start)) |
| 380 | ;; Return the data we got back, or nil if the process died. | 380 | ;; Return the data we got back, or nil if the process died. |
| 381 | (unless (= start (point)) | 381 | (unless (= start (point)) |
diff --git a/lisp/net/pop3.el b/lisp/net/pop3.el index bcf56c9ab3f..3aac5b5c45c 100644 --- a/lisp/net/pop3.el +++ b/lisp/net/pop3.el | |||
| @@ -165,12 +165,7 @@ Used for APOP authentication.") | |||
| 165 | "How long pop3 should wait between checking for the end of output. | 165 | "How long pop3 should wait between checking for the end of output. |
| 166 | Shorter values mean quicker response, but are more CPU intensive.") | 166 | Shorter values mean quicker response, but are more CPU intensive.") |
| 167 | (defun pop3-accept-process-output (process) | 167 | (defun pop3-accept-process-output (process) |
| 168 | (accept-process-output | 168 | (accept-process-output process pop3-read-timeout)))) |
| 169 | process | ||
| 170 | (truncate pop3-read-timeout) | ||
| 171 | (truncate (* (- pop3-read-timeout | ||
| 172 | (truncate pop3-read-timeout)) | ||
| 173 | 1000)))))) | ||
| 174 | 169 | ||
| 175 | (defvar pop3-uidl) | 170 | (defvar pop3-uidl) |
| 176 | ;; List of UIDLs of existing messages at present in the server: | 171 | ;; List of UIDLs of existing messages at present in the server: |
diff --git a/lisp/obsolete/starttls.el b/lisp/obsolete/starttls.el index b89e612e4a3..e0a09688f45 100644 --- a/lisp/obsolete/starttls.el +++ b/lisp/obsolete/starttls.el | |||
| @@ -217,7 +217,7 @@ handshake, or nil on failure." | |||
| 217 | starttls-success nil t)) | 217 | starttls-success nil t)) |
| 218 | (setq done-bad (re-search-forward | 218 | (setq done-bad (re-search-forward |
| 219 | starttls-failure nil t)))))) | 219 | starttls-failure nil t)))))) |
| 220 | (accept-process-output process 1 100) | 220 | (accept-process-output process 1.1) |
| 221 | (sit-for 0.1)) | 221 | (sit-for 0.1)) |
| 222 | (setq info (buffer-substring-no-properties old-max (point-max))) | 222 | (setq info (buffer-substring-no-properties old-max (point-max))) |
| 223 | (delete-region old-max (point-max)) | 223 | (delete-region old-max (point-max)) |
| @@ -251,7 +251,7 @@ handshake, or nil on failure." | |||
| 251 | (goto-char old-max) | 251 | (goto-char old-max) |
| 252 | (not (setq done (re-search-forward | 252 | (not (setq done (re-search-forward |
| 253 | starttls-connect nil t))))) | 253 | starttls-connect nil t))))) |
| 254 | (accept-process-output process 0 100) | 254 | (accept-process-output process 0.1) |
| 255 | (sit-for 0.1)) | 255 | (sit-for 0.1)) |
| 256 | (if done | 256 | (if done |
| 257 | (with-current-buffer buffer | 257 | (with-current-buffer buffer |
diff --git a/lisp/server.el b/lisp/server.el index a5d5e561db5..c38fdf84835 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -1744,7 +1744,7 @@ returns the process ID of the Emacs instance running \"server\"." | |||
| 1744 | (server-quote-arg (format "%S" form)) | 1744 | (server-quote-arg (format "%S" form)) |
| 1745 | "\n")) | 1745 | "\n")) |
| 1746 | (while (memq (process-status process) '(open run)) | 1746 | (while (memq (process-status process) '(open run)) |
| 1747 | (accept-process-output process 0 10)) | 1747 | (accept-process-output process 0.01)) |
| 1748 | (goto-char (point-min)) | 1748 | (goto-char (point-min)) |
| 1749 | ;; If the result is nil, there's nothing in the buffer. If the | 1749 | ;; If the result is nil, there's nothing in the buffer. If the |
| 1750 | ;; result is non-nil, it's after "-print ". | 1750 | ;; result is non-nil, it's after "-print ". |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 22047598b26..418901dae48 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -1782,11 +1782,15 @@ You can set this variable in hooks in your init file -- eg: | |||
| 1782 | 1782 | ||
| 1783 | 1783 | ||
| 1784 | (defun ispell-accept-output (&optional timeout-secs timeout-msecs) | 1784 | (defun ispell-accept-output (&optional timeout-secs timeout-msecs) |
| 1785 | "Wait for output from Ispell process, or TIMEOUT-SECS and TIMEOUT-MSECS. | 1785 | "Wait for output from Ispell process, or for TIMEOUT-SECS + TIMEOUT-MSECS. |
| 1786 | \(The TIMEOUT-MSECS argument is obsolete and should be avoided.) | ||
| 1786 | If asynchronous subprocesses are not supported, call function `ispell-filter' | 1787 | If asynchronous subprocesses are not supported, call function `ispell-filter' |
| 1787 | and pass it the output of the last Ispell invocation." | 1788 | and pass it the output of the last Ispell invocation." |
| 1788 | (if ispell-async-processp | 1789 | (if ispell-async-processp |
| 1789 | (accept-process-output ispell-process timeout-secs timeout-msecs) | 1790 | (let ((timeout (if timeout-msecs |
| 1791 | (+ (or timeout-secs 0) (/ timeout-msecs 1000.0)) | ||
| 1792 | timeout-secs))) | ||
| 1793 | (accept-process-output ispell-process timeout)) | ||
| 1790 | (if (null ispell-process) | 1794 | (if (null ispell-process) |
| 1791 | (error "No Ispell process to read output from!") | 1795 | (error "No Ispell process to read output from!") |
| 1792 | (let ((buf ispell-output-buffer) | 1796 | (let ((buf ispell-output-buffer) |