From: Stefan Kangas Date: Sat, 21 Oct 2023 10:26:00 +0000 (+0200) Subject: Don't use obsolete `sleep-for` argument X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2e19e11638339d0ae97958547bd87b4b15c2ee52;p=emacs.git Don't use obsolete `sleep-for` argument * lisp/net/sieve-manage.el (sieve-manage-wait-for-answer): * lisp/org/ob-lua.el (org-babel-lua-evaluate-session): * lisp/org/ob-python.el (org-babel-python-initiate-session-by-key): (org-babel-python-evaluate-session): Don't use obsolete 'sleep-for' argument. --- diff --git a/lisp/net/sieve-manage.el b/lisp/net/sieve-manage.el index 5bee4f4c4ad..81f50e74987 100644 --- a/lisp/net/sieve-manage.el +++ b/lisp/net/sieve-manage.el @@ -511,7 +511,7 @@ If NAME is nil, return the full server list of capabilities." (while (not pos) (setq pos (search-forward-regexp pattern nil t)) (goto-char (point-min)) - (sleep-for 0 50)) + (sleep-for 0.05)) pos)) (defun sieve-manage-drop-next-answer () diff --git a/lisp/org/ob-lua.el b/lisp/org/ob-lua.el index 81521d9e0a5..7eaf5e00b13 100644 --- a/lisp/org/ob-lua.el +++ b/lisp/org/ob-lua.el @@ -326,7 +326,7 @@ last statement in BODY, as elisp." If RESULT-TYPE equals `output' then return standard output as a string. If RESULT-TYPE equals `value' then return the value of the last statement in BODY, as elisp." - (let* ((send-wait (lambda () (comint-send-input nil t) (sleep-for 0 5))) + (let* ((send-wait (lambda () (comint-send-input nil t) (sleep-for 0.005))) (dump-last-value (lambda (tmp-file pp) diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el index 6c05d1c8b2a..48a906a1934 100644 --- a/lisp/org/ob-python.el +++ b/lisp/org/ob-python.el @@ -235,7 +235,7 @@ then create. Return the initialized session." ;; multiple prompts during initialization. (with-current-buffer py-buffer (while (not org-babel-python--initialized) - (sleep-for 0 10))) + (sleep-for 0.01))) (org-babel-comint-wait-for-output py-buffer)) (setq org-babel-python-buffers (cons (cons session py-buffer) @@ -403,7 +403,7 @@ last statement in BODY, as elisp." (body (org-babel-python-format-session-value tmp-src-file tmp-results-file result-params))) (org-babel-python--send-string session body) - (sleep-for 0 10) + (sleep-for 0.01) (org-babel-eval-read-file tmp-results-file))))))) (org-babel-result-cond result-params results