>From 580b84d7210b279e94a5a3fb8e14e63f1ea66080 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 25 May 2011 15:45:19 +0200 Subject: [PATCH 2/3] Remove trailing ^M on W32 machines. --- tramp-adb.el | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tramp-adb.el b/tramp-adb.el index 42bbde7..33fb985 100644 --- a/tramp-adb.el +++ b/tramp-adb.el @@ -408,8 +408,12 @@ Returns nil if there has been an error message from adb." (with-current-buffer (tramp-get-connection-buffer vec) (save-excursion (goto-char (point-min)) - ;; we can't use stty to disable echo of command - (delete-matching-lines (regexp-quote command))))) + ;; We can't use stty to disable echo of command. + (delete-matching-lines (regexp-quote command)) + ;; When the local machine is W32, there are still trailing ^M. + ;; There must be a better solution by setting the correct coding + ;; system, but this requires changes in core Tramp. + (replace-regexp "\r+$" "" nil (point-min) (point-max))))) (defun tramp-adb-wait-for-output (proc &optional timeout) "Wait for output from remote command." -- 1.7.4.1