emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/async b4b5a7eedc: Protect string-match by ensuring tram


From: ELPA Syncer
Subject: [elpa] externals/async b4b5a7eedc: Protect string-match by ensuring tramp-password-prompt-regexp
Date: Wed, 22 Nov 2023 18:57:19 -0500 (EST)

branch: externals/async
commit b4b5a7eedc30122aebf84ee950dc84da444e8953
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Protect string-match by ensuring tramp-password-prompt-regexp
    
    is bound.
---
 async.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/async.el b/async.el
index a74193298a..32e3bf5c07 100644
--- a/async.el
+++ b/async.el
@@ -33,7 +33,8 @@
 ;;; Code:
 
 (eval-when-compile (require 'cl-lib))
-(require 'tramp)
+
+(defvar tramp-password-prompt-regexp)
 
 (defgroup async nil
   "Simple asynchronous processing in Emacs"
@@ -220,7 +221,8 @@ lasts complete line.  Every time we get new input, we try 
to look
 for newline, and if found, process the entire line and bump the
 marker position to the end of this next line."
   (with-current-buffer (process-buffer proc)
-    (when (string-match tramp-password-prompt-regexp string)
+    (when (and (boundp 'tramp-password-prompt-regexp)
+               (string-match tramp-password-prompt-regexp string))
       (process-send-string proc (concat (read-passwd (match-string 0 string)) 
"\n")))
     (goto-char (point-max))
     (save-excursion



reply via email to

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