From: Jim Porter Date: Mon, 16 Oct 2023 20:21:07 +0000 (-0700) Subject: ; Use the "new" calling convention for 'sit-for' in Eshell X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=266ed1b847771bfb6c7fc974c53d820059b6e31d;p=emacs.git ; Use the "new" calling convention for 'sit-for' in Eshell * lisp/eshell/esh-proc.el (eshell-process-wait-seconds) (eshell-process-wait-milliseconds): Make obsolete in favor of... (eshell-process-wait-time): ... this, and... (eshell-wait-for-process): ... use it. * etc/NEWS: Announce this change (bug#66574). --- diff --git a/etc/NEWS b/etc/NEWS index 3bd47a0112b..02b794a2964 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1025,6 +1025,10 @@ Use 'define-minor-mode' and 'define-globalized-minor-mode' instead. ** The obsolete calling convention of 'sit-for' has been removed. That convention was: (sit-for SECONDS MILLISEC &optional NODISP) +** 'eshell-process-wait-{seconds,milliseconds}' options are now obsolete. +Instead, use 'eshell-process-wait-time', which supports floating-point +values. + * Lisp Changes in Emacs 30.1 diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index bc3776259a7..a91e0a16825 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -40,13 +40,21 @@ finish." :version "24.1" ; removed eshell-proc-initialize :type 'hook) +(defcustom eshell-process-wait-time 0.05 + "The number of seconds to delay waiting for a synchronous process." + :type 'number) + (defcustom eshell-process-wait-seconds 0 "The number of seconds to delay waiting for a synchronous process." :type 'integer) +(make-obsolete-variable 'eshell-process-wait-seconds + 'eshell-process-wait-time "30.1") (defcustom eshell-process-wait-milliseconds 50 "The number of milliseconds to delay waiting for a synchronous process." :type 'integer) +(make-obsolete-variable 'eshell-process-wait-milliseconds + 'eshell-process-wait-time "30.1") (defcustom eshell-done-messages-in-minibuffer t "If non-nil, subjob \"Done\" messages will display in minibuffer." @@ -171,8 +179,7 @@ This is like `process-live-p', but additionally checks whether (while (eshell-process-active-p proc) (when (input-pending-p) (discard-input)) - (sit-for eshell-process-wait-seconds - eshell-process-wait-milliseconds))))) + (sit-for eshell-process-wait-time))))) (defalias 'eshell/wait #'eshell-wait-for-process)