summaryrefslogtreecommitdiff
path: root/lisp/comint.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2010-10-23 12:56:57 -0700
committerGlenn Morris <rgm@gnu.org>2010-10-23 12:56:57 -0700
commit7aa93795cbf073ff3b4a20639ff2a4e34d9716e5 (patch)
tree2aa08fa474654ee0cd119f4be1f4a9fb785a3fc4 /lisp/comint.el
parent41f592d1b53b2667a9bdf3fc6ce13849eea36b34 (diff)
downloademacs-7aa93795cbf073ff3b4a20639ff2a4e34d9716e5.tar.gz
* lisp/comint.el (comint-password-prompt-regexp): Make it less vague.
Bump custom version. The initial regexp-opt was bracketed by \\( \\)?, so it might as well have not been there at all. This change makes it non-optional, and adds back "^". Hopefully the behaviour is now closer to that of emacs-23, before it was re-written in http://debbugs.gnu.org/2817.
Diffstat (limited to 'lisp/comint.el')
-rw-r--r--lisp/comint.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index f9346f64c1f..0eee4128a2b 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -339,13 +339,15 @@ This variable is buffer-local."
;; Ubuntu's sudo prompts like `[sudo] password for user:'
;; Some implementations of passwd use "Password (again)" as the 2nd prompt.
;; Something called "perforce" uses "Enter password:".
+;; See M-x comint-testsuite--test-comint-password-prompt-regexp.
(defcustom comint-password-prompt-regexp
(concat
- "\\("
+ "\\(^ *\\|"
(regexp-opt
- '("Enter" "Enter same" "Old" "old" "New" "new" "'s" "login"
- "Kerberos" "CVS" "UNIX" " SMB" "LDAP" "[sudo]" "Repeat" "Bad"))
- " +\\)?"
+ '("Enter" "enter" "Enter same" "enter same" "Enter the" "enter the"
+ "Old" "old" "New" "new" "'s" "login"
+ "Kerberos" "CVS" "UNIX" " SMB" "LDAP" "[sudo]" "Repeat" "Bad") t)
+ " +\\)"
(regexp-opt
'("password" "Password" "passphrase" "Passphrase"
"pass phrase" "Pass phrase"))
@@ -353,6 +355,7 @@ This variable is buffer-local."
\\(?: for [^:]+\\)?:\\s *\\'")
"Regexp matching prompts for passwords in the inferior process.
This is used by `comint-watch-for-password-prompt'."
+ :version "24.1"
:type 'regexp
:group 'comint)
@@ -3748,5 +3751,4 @@ REGEXP-GROUP is the regular expression group in REGEXP to use."
(provide 'comint)
-;; arch-tag: 1793314c-09db-40be-9549-9aeae3e75164
;;; comint.el ends here