emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 266ed1b8477: ; Use the "new" calling convention for 'sit-for' in


From: Jim Porter
Subject: master 266ed1b8477: ; Use the "new" calling convention for 'sit-for' in Eshell
Date: Mon, 16 Oct 2023 16:29:26 -0400 (EDT)

branch: master
commit 266ed1b847771bfb6c7fc974c53d820059b6e31d
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>

    ; 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).
---
 etc/NEWS                |  4 ++++
 lisp/eshell/esh-proc.el | 11 +++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

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)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]