summaryrefslogtreecommitdiff
path: root/lisp/eshell
diff options
context:
space:
mode:
authorMiha Rihtaršič <miha@kamnitnik.top>2021-10-18 15:24:54 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-10-18 15:24:54 +0200
commita6f156a7b03e410c044ad96f1ba16645d451c083 (patch)
treec71d524548c898cb28f3e06df8d3e5a87a045eaf /lisp/eshell
parentf3c5a1b3685debefb9c019f96992b887f6ca69f2 (diff)
downloademacs-a6f156a7b03e410c044ad96f1ba16645d451c083.tar.gz
emacs-a6f156a7b03e410c044ad96f1ba16645d451c083.tar.bz2
emacs-a6f156a7b03e410c044ad96f1ba16645d451c083.zip
*-watch-for-password-prompt: Use run-at-time to read password
* lisp/comint.el (comint-watch-for-password-prompt): * lisp/eshell/esh-mode.el (eshell-watch-for-password-prompt): * lisp/term.el (term-watch-for-password-prompt): Use run-at-time to read a password (bug#51263).
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/esh-mode.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 98e89037f33..579b01f4d1f 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -940,7 +940,14 @@ This function could be in the list `eshell-output-filter-functions'."
(beginning-of-line)
(if (re-search-forward eshell-password-prompt-regexp
eshell-last-output-end t)
- (eshell-send-invisible))))))
+ ;; Use `run-at-time' in order not to pause execution of
+ ;; the process filter with a minibuffer
+ (run-at-time
+ 0 nil
+ (lambda (current-buf)
+ (with-current-buffer current-buf
+ (eshell-send-invisible)))
+ (current-buffer)))))))
(custom-add-option 'eshell-output-filter-functions
'eshell-watch-for-password-prompt)