aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2007-07-15 01:00:55 +0000
committerJason Rumney2007-07-15 01:00:55 +0000
commit3af378034d580f0844be9bd6d4dfb264a239741d (patch)
tree8dd3aeb9ba24b6724e9dc85afb9ef6712ebfc798
parenta272a739555b7ad66b13e905b23747aa5f179e47 (diff)
downloademacs-3af378034d580f0844be9bd6d4dfb264a239741d.tar.gz
emacs-3af378034d580f0844be9bd6d4dfb264a239741d.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 bc94864ac44..61448396b13 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12007-07-15 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-14 Stefan Monnier <monnier@iro.umontreal.ca> 102007-07-14 Stefan Monnier <monnier@iro.umontreal.ca>
2 11
3 * emacs-lisp/autoload.el (generated-autoload-file): Autoload the 12 * emacs-lisp/autoload.el (generated-autoload-file): Autoload the
diff --git a/lisp/comint.el b/lisp/comint.el
index ddc3a2f503b..17ab13337aa 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.