From: Michael Albinus Date: Mon, 2 Dec 2024 18:21:54 +0000 (+0100) Subject: Fix password prompt in comint (don't merge) X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~2^2~20^2~227 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e618d5ae941d005e9da6d5d5cba68cc0ecade0e5;p=emacs.git Fix password prompt in comint (don't merge) * lisp/comint.el (comint-watch-for-password-prompt): Use whole string for setting the prompt. (Bug#74626) --- diff --git a/lisp/comint.el b/lisp/comint.el index 8860b3edb11..d52090911b9 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2573,8 +2573,7 @@ This function could be in the list `comint-output-filter-functions'." (when (let ((case-fold-search t)) (string-match comint-password-prompt-regexp (string-replace "\r" "" string))) - (setq prompt (string-trim (match-string 0 string) - "[ \n\r\t\v\f\b\a]+" "\n+")) + (setq prompt (string-trim string "[ \n\r\t\v\f\b\a]+" "\n+")) ;; Use `run-at-time' in order not to pause execution of the ;; process filter with a minibuffer (run-at-time