emacs-diffs
[Top][All Lists]
Advanced

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

master 5b112482fb: Make comint-watch-for-password-prompt more resilient


From: Lars Ingebrigtsen
Subject: master 5b112482fb: Make comint-watch-for-password-prompt more resilient
Date: Sat, 2 Jul 2022 08:28:54 -0400 (EDT)

branch: master
commit 5b112482fbdb0351487a7af592ae901e20ec45c1
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Make comint-watch-for-password-prompt more resilient
    
    * lisp/comint.el (comint-watch-for-password-prompt): Don't try to
    send commands to the process after it's exited (bug#56336).  (This
    commonly happens when invoked via `M-&'.)
---
 lisp/comint.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/comint.el b/lisp/comint.el
index 3da61fb992..92262eab32 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -2515,8 +2515,9 @@ This function could be in the list 
`comint-output-filter-functions'."
                 (1+ comint--prompt-recursion-depth)))
            (if (> comint--prompt-recursion-depth 10)
                (message "Password prompt recursion too deep")
-             (comint-send-invisible
-              (string-trim string "[ \n\r\t\v\f\b\a]+" "\n+"))))))
+             (when (get-buffer-process (current-buffer))
+               (comint-send-invisible
+                (string-trim string "[ \n\r\t\v\f\b\a]+" "\n+")))))))
      (current-buffer))))
 
 ;; Low-level process communication



reply via email to

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