emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r116057: Fix Bug#13124.


From: Michael Albinus
Subject: [Emacs-diffs] trunk r116057: Fix Bug#13124.
Date: Fri, 17 Jan 2014 16:45:54 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116057
revision-id: address@hidden
parent: address@hidden
author: Chong Yidong <address@hidden>
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Fri 2014-01-17 17:45:45 +0100
message:
  Fix Bug#13124.
  
  * simple.el (password-word-equivalents): New defcustom.
  * comint.el (comint-password-prompt-regexp): Use it.  Bump version to 24.4.
  (comint-watch-for-password-prompt): Let-bind `case-fold-search' to t.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/comint.el                 comint.el-20091113204419-o5vbwnq5f7feedwu-149
  lisp/simple.el                 simple.el-20091113204419-o5vbwnq5f7feedwu-403
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-01-17 14:58:34 +0000
+++ b/lisp/ChangeLog    2014-01-17 16:45:45 +0000
@@ -1,3 +1,11 @@
+2014-01-17  Chong Yidong  <address@hidden>
+
+       * simple.el (password-word-equivalents): New defcustom.
+       * comint.el (comint-password-prompt-regexp): Use it.  Bump version
+       to 24.4.
+       (comint-watch-for-password-prompt): Let-bind `case-fold-search'
+       to t.  (Bug#13124)
+
 2014-01-17  Dmitry Gutov  <address@hidden>
 
        * progmodes/ruby-mode.el (ruby-alignable-keywords): New constant.

=== modified file 'lisp/comint.el'
--- a/lisp/comint.el    2014-01-01 07:43:34 +0000
+++ b/lisp/comint.el    2014-01-17 16:45:45 +0000
@@ -347,14 +347,12 @@
       "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" "Response"))
+   "\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)"
    "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?\
-\\(?: for .+\\)?:\\s *\\'")
+\\(?: for [^::៖]+\\)?[::៖]\\s *\\'")
   "Regexp matching prompts for passwords in the inferior process.
 This is used by `comint-watch-for-password-prompt'."
-  :version "24.1"
+  :version "24.4"
   :type 'regexp
   :group 'comint)
 
@@ -2318,7 +2316,8 @@
 `comint-password-prompt-regexp'.
 
 This function could be in the list `comint-output-filter-functions'."
-  (when (string-match comint-password-prompt-regexp string)
+  (when (let ((case-fold-search t))
+         (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)))
     (send-invisible string)))
@@ -3631,8 +3630,8 @@
     ;; If we see the prompt, tidy up
     ;; We'll look for the prompt in the original string, so nobody can
     ;; clobber it
-    (and (string-match comint-redirect-finished-regexp 
-                       (concat comint-redirect-previous-input-string 
+    (and (string-match comint-redirect-finished-regexp
+                       (concat comint-redirect-previous-input-string
                                input-string))
         (progn
           (and comint-redirect-verbose

=== modified file 'lisp/simple.el'
--- a/lisp/simple.el    2014-01-17 14:58:34 +0000
+++ b/lisp/simple.el    2014-01-17 16:45:45 +0000
@@ -2555,6 +2555,64 @@
     (setq buffer-undo-list nil)
     t))
 
+(defcustom password-word-equivalents
+  '("password" "passphrase" "pass phrase"
+    "كلمة السر"    ; ar
+    "গুপ্তশব্দ"        ; as
+    "পাসওয়ার্ড"       ; bn_IN
+    "contrasenya"  ; ca
+    "heslo"        ; cs
+    "adgangskode"  ; da
+    "passwort"     ; de
+    "pasvorto"     ; eo
+    "contraseña"   ; es
+    "pasahitza"    ; eu
+    "salasana"     ; fi
+    "mot de passe" ; fr
+    "પાસવર્ડ"       ; gu
+    "ססמה"         ; he
+    "शब्दकूट"        ; hi
+    "lozinka"      ; hr
+    "Jelszó: "     ; hu
+    "パスワード"     ; ja
+    "Пароль"       ; kk
+    "ಗುಪ್ತಪದ"      ; kn
+    "암호"         ; ko
+    "ពាក្យសម្ងាត់" ; km
+    "slaptažodis"  ; lt
+    "അടയാളവാക്ക്"   ; ml
+    "गुप्तशब्द"       ; mr
+    "passord"      ; nb
+    "wachtwoord"   ; nl
+    "ପ୍ରବେଶ ସଙ୍କେତ" ; or
+    "ਪਾਸਵਰਡ"       ; pa
+    "hasło"        ; pl
+    "senha"        ; pt
+    "Пароль"       ; ru
+    "රහස්පදය"      ; si
+    "Heslo"        ; sk
+    "geslo"        ; sl
+    "lozinka"      ; sr
+    "Лозинка"      ; sr
+    "lösenord"     ; sv
+    "கடவுச்சொல்"    ; ta
+    "సంకేతపదము"     ; te
+    "parola"       ; tr
+    "Пароль"       ; uk
+    "Mật khẩu"     ; vi
+    "密码"          ; zh_CN
+    "密碼"          ; zh_TW
+    "iphasiwedi"   ; zu
+    )
+  "List of words equivalent to \"password\".
+This is used by Shell mode and other parts of Emacs to recognize
+password prompts, including prompts in languages other than
+English.  Different case choices should not be assumed to be
+included; callers should bind `case-fold-search' to t."
+  :type '(repeat string)
+  :version "24.4"
+  :group 'processes)
+
 (defvar shell-command-history nil
   "History list for some commands that read shell commands.
 


reply via email to

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