aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2007-07-22 22:55:09 +0000
committerJason Rumney2007-07-22 22:55:09 +0000
commitd93290ed100772393a6ced91c49675e169b58ea3 (patch)
tree13c7cb1b5f9482c4e0f917af9eadd6818c584cc2
parent4fc066e16472fe985ebc34eb9b2b4e37a53a074c (diff)
downloademacs-d93290ed100772393a6ced91c49675e169b58ea3.tar.gz
emacs-d93290ed100772393a6ced91c49675e169b58ea3.zip
(comint-simple-send): Concat newline before sending.
(comint-password-prompt-regexp): Recognize plink's passphrase prompt.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/comint.el18
2 files changed, 21 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2d63c163eea..6f3da013030 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12007-07-22 Jason Rumney <jasonr@gnu.org>
2
3 * w32-fns.el (set-default-process-coding-system): Use dos line ends
4 for input to cmdproxy on all versions of Windows.
5 Use dos line ends for input to plink.
6
7 * comint.el (comint-simple-send): Concat newline before sending.
8 (comint-password-prompt-regexp): Recognize plink's passphrase prompt.
9
12007-07-22 Juri Linkov <juri@jurta.org> 102007-07-22 Juri Linkov <juri@jurta.org>
2 11
3 * isearch.el (isearch-edit-string): Save old point and 12 * isearch.el (isearch-edit-string): Save old point and
diff --git a/lisp/comint.el b/lisp/comint.el
index 7d81f357e22..43d12946fce 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -333,12 +333,13 @@ This variable is buffer-local."
333;; kinit prints a prompt like `Password for devnull@GNU.ORG: '. 333;; kinit prints a prompt like `Password for devnull@GNU.ORG: '.
334;; ksu prints a prompt like `Kerberos password for devnull/root@GNU.ORG: '. 334;; ksu prints a prompt like `Kerberos password for devnull/root@GNU.ORG: '.
335;; ssh-add prints a prompt like `Enter passphrase: '. 335;; ssh-add prints a prompt like `Enter passphrase: '.
336;; plink prints a prompt like `Passphrase for key "root@GNU.ORG": '.
336;; Some implementations of passwd use "Password (again)" as the 2nd prompt. 337;; Some implementations of passwd use "Password (again)" as the 2nd prompt.
337(defcustom comint-password-prompt-regexp 338(defcustom comint-password-prompt-regexp
338 "\\(\\([Oo]ld \\|[Nn]ew \\|'s \\|login \\|\ 339 "\\(\\([Oo]ld \\|[Nn]ew \\|'s \\|login \\|\
339Kerberos \\|CVS \\|UNIX \\| SMB \\|^\\)\ 340Kerberos \\|CVS \\|UNIX \\| SMB \\|^\\)\
340\[Pp]assword\\( (again)\\)?\\|\ 341\[Pp]assword\\( (again)\\)?\\|\
341pass phrase\\|\\(Enter\\|Repeat\\|Bad\\) passphrase\\)\ 342pass phrase\\|\\(Enter \\|Repeat \\|Bad \\)?[Pp]assphrase\\)\
342\\(?:, try again\\)?\\(?: for [^:]+\\)?:\\s *\\'" 343\\(?:, try again\\)?\\(?: for [^:]+\\)?:\\s *\\'"
343 "*Regexp matching prompts for passwords in the inferior process. 344 "*Regexp matching prompts for passwords in the inferior process.
344This is used by `comint-watch-for-password-prompt'." 345This is used by `comint-watch-for-password-prompt'."
@@ -1953,11 +1954,16 @@ If this takes us past the end of the current line, don't skip at all."
1953 "Default function for sending to PROC input STRING. 1954 "Default function for sending to PROC input STRING.
1954This just sends STRING plus a newline. To override this, 1955This just sends STRING plus a newline. To override this,
1955set the hook `comint-input-sender'." 1956set the hook `comint-input-sender'."
1956 (comint-send-string proc string) 1957 (let ((send-string
1957 (if comint-input-sender-no-newline 1958 (if comint-input-sender-no-newline
1958 (if (not (string-equal string "")) 1959 string
1959 (process-send-eof)) 1960 ;; Sending as two separate strings does not work
1960 (comint-send-string proc "\n"))) 1961 ;; on Windows, so concat the \n before sending.
1962 (concat string "\n"))))
1963 (comint-send-string proc send-string))
1964 (if (and comint-input-sender-no-newline
1965 (not (string-equal string "")))
1966 (process-send-eof)))
1961 1967
1962(defun comint-line-beginning-position () 1968(defun comint-line-beginning-position ()
1963 "Return the buffer position of the beginning of the line, after any prompt. 1969 "Return the buffer position of the beginning of the line, after any prompt.