emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r106878: * net/tramp.el (tramp-local-


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106878: * net/tramp.el (tramp-local-end-of-line): New defcustom.
Date: Tue, 17 Jan 2012 11:29:52 +0100
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106878
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Tue 2012-01-17 11:29:52 +0100
message:
  * net/tramp.el (tramp-local-end-of-line): New defcustom.
  (tramp-action-login, tramp-action-yesno, tramp-action-yn)
  (tramp-action-terminal): Use it.  (Bug#10530)
modified:
  lisp/ChangeLog
  lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-01-16 15:50:28 +0000
+++ b/lisp/ChangeLog    2012-01-17 10:29:52 +0000
@@ -1,3 +1,9 @@
+2012-01-17  Michael Albinus  <address@hidden>
+
+       * net/tramp.el (tramp-local-end-of-line): New defcustom.
+       (tramp-action-login, tramp-action-yesno, tramp-action-yn)
+       (tramp-action-terminal): Use it.  (Bug#10530)
+
 2012-01-16  Stefan Monnier  <address@hidden>
 
        * minibuffer.el (completion--replace): Strip properties (bug#10062).

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2012-01-05 09:46:05 +0000
+++ b/lisp/net/tramp.el 2012-01-17 10:29:52 +0000
@@ -460,6 +460,12 @@
   "Regexp which matches `tramp-echo-mark' as it gets echoed by
 the remote shell.")
 
+(defcustom tramp-local-end-of-line
+  (if (memq system-type '(windows-nt)) "\r\n" "\n")
+  "*String used for end of line in local processes."
+  :group 'tramp
+  :type 'string)
+
 (defcustom tramp-rsh-end-of-line "\n"
   "*String used for end of line in rsh connections.
 I don't think this ever needs to be changed, so please tell me about it
@@ -1902,7 +1908,7 @@
                  ;; operations shall return at least a default value
                  ;; in order to give the user a chance to correct the
                  ;; file name in the minibuffer.
-                 ;; We cannot use 'debug as error handler.  In order
+                 ;; We cannot use `debug' as error handler.  In order
                  ;; to get a full backtrace, one could apply
                  ;;   (setq debug-on-error t debug-on-signal t)
                  (error
@@ -3116,7 +3122,7 @@
   (tramp-message vec 3 "Sending login name `%s'" tramp-current-user)
   (with-current-buffer (tramp-get-connection-buffer vec)
     (tramp-message vec 6 "\n%s" (buffer-string)))
-  (tramp-send-string vec tramp-current-user))
+  (tramp-send-string vec (concat tramp-current-user tramp-local-end-of-line)))
 
 (defun tramp-action-password (proc vec)
   "Query the user for a password."
@@ -3148,7 +3154,7 @@
        (throw 'tramp-action 'permission-denied))
       (with-current-buffer (tramp-get-connection-buffer vec)
        (tramp-message vec 6 "\n%s" (buffer-string)))
-      (tramp-send-string vec "yes"))))
+      (tramp-send-string vec (concat "yes" tramp-local-end-of-line)))))
 
 (defun tramp-action-yn (proc vec)
   "Ask the user for confirmation using `y-or-n-p'.
@@ -3162,7 +3168,7 @@
        (throw 'tramp-action 'permission-denied))
       (with-current-buffer (tramp-get-connection-buffer vec)
        (tramp-message vec 6 "\n%s" (buffer-string)))
-      (tramp-send-string vec "y"))))
+      (tramp-send-string vec (concat "y" tramp-local-end-of-line)))))
 
 (defun tramp-action-terminal (proc vec)
   "Tell the remote host which terminal type to use.
@@ -3170,7 +3176,7 @@
   (tramp-message vec 5 "Setting `%s' as terminal type." tramp-terminal-type)
   (with-current-buffer (tramp-get-connection-buffer vec)
     (tramp-message vec 6 "\n%s" (buffer-string)))
-  (tramp-send-string vec tramp-terminal-type))
+  (tramp-send-string vec (concat tramp-terminal-type tramp-local-end-of-line)))
 
 (defun tramp-action-process-alive (proc vec)
   "Check, whether a process has finished."


reply via email to

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