From 74277b0e88197c169acfc16025e0e116230c021e Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Fri, 17 Aug 2018 06:29:35 -0400 Subject: [PATCH] Fix comint-password-prompt-regexp The change from 2017-12-22 "Support French password prompts in shell" tried to allow nonbreaking space in addition to whitespace syntax characters around the colon, but used square brackets which cause "\s" to be interpreted literally rather than as a backslash construct. * lisp/comint.el (comint-password-prompt-regexp): Use [[:blank:]] instead, which also has the benefit of not relying on the major mode's whitespace syntax setting. * test/lisp/comint-tests.el (comint-testsuite-password-strings): Update French localized entry to have a space before the colon, as reported in Bug#29729. --- lisp/comint.el | 2 +- test/lisp/comint-tests.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/comint.el b/lisp/comint.el index a9c3e47f88e..51c7e81e09a 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -364,7 +364,7 @@ This variable is buffer-local." "\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)" "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?" ;; "[[:alpha:]]" used to be "for", which fails to match non-English. - "\\(?: [[:alpha:]]+ .+\\)?[\\s  ]*[::៖][\\s  ]*\\'") + "\\(?: [[:alpha:]]+ .+\\)?[[:blank:]]*[::៖][[:blank:]]*\\'") "Regexp matching prompts for passwords in the inferior process. This is used by `comint-watch-for-password-prompt'." :version "27.1" diff --git a/test/lisp/comint-tests.el b/test/lisp/comint-tests.el index 64898888ba8..366fcc9ad89 100644 --- a/test/lisp/comint-tests.el +++ b/test/lisp/comint-tests.el @@ -38,7 +38,7 @@ "[sudo] password for user:" ; Ubuntu sudo "Password (again):" "Enter password:" - "Mot de Passe:" ; localized + "Mot de Passe :" ; localized (Bug#29729) "Passwort:") ; localized "List of strings that should match `comint-password-prompt-regexp'.") -- 2.39.2