]> git.eshelyaron.com Git - emacs.git/commitdiff
(comint-watch-for-password-prompt): Remove whitespace
authorFrancesco Potortì <pot@gnu.org>
Thu, 18 Apr 2002 19:41:57 +0000 (19:41 +0000)
committerFrancesco Potortì <pot@gnu.org>
Thu, 18 Apr 2002 19:41:57 +0000 (19:41 +0000)
at the beginning of password prompts.

lisp/comint.el

index c47baba3651365205f80ac05203d4efeacf3c12b..aa5dfdfc84652cc97abeefa4b49a03a7230b7458 100644 (file)
@@ -1984,6 +1984,8 @@ process if STRING contains a password prompt defined by
 
 This function could be in the list `comint-output-filter-functions'."
   (when (string-match comint-password-prompt-regexp string)
+    (when (string-match "^[ \n\r\t\v\f\b\a]+" string)
+      (setq string (replace-match "" t t string)))
     (let ((pw (comint-read-noecho string t)))
       (send-invisible pw))))
 \f