emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master e7044d2 1/2: Ensure proper EOL handling for Tramp o


From: Michael Albinus
Subject: [Emacs-diffs] master e7044d2 1/2: Ensure proper EOL handling for Tramp on macOS
Date: Mon, 23 Apr 2018 04:16:51 -0400 (EDT)

branch: master
commit e7044d294c1b1779b3124b27ba0f09b22b64df20
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Ensure proper EOL handling for Tramp on macOS
    
    * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
    Ensure proper EOL handling for Darwin.
---
 lisp/net/tramp-sh.el | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 2fb5566..58982e5 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4157,7 +4157,10 @@ process to set up.  VEC specifies the connection."
     (with-current-buffer (process-buffer proc)
       ;; Use MULE to select the right EOL convention for communicating
       ;; with the process.
-      (let ((cs (or (and (memq 'utf-8 (coding-system-list))
+      (let ((cs (or (and (memq 'utf-8-hfs (coding-system-list))
+                        (string-match "^Darwin" uname)
+                        (cons 'utf-8-hfs 'utf-8-hfs))
+                   (and (memq 'utf-8 (coding-system-list))
                         (string-match "utf-?8" (tramp-get-remote-locale vec))
                         (cons 'utf-8 'utf-8))
                    (process-coding-system proc)
@@ -4173,11 +4176,6 @@ process to set up.  VEC specifies the connection."
        (goto-char (point-min))
        (when (search-forward "\r" nil t)
          (setq cs-decode (coding-system-change-eol-conversion cs-decode 'dos)))
-       ;; Special setting for macOS.
-       (when (and (string-match "^Darwin" uname)
-                  (memq 'utf-8-hfs (coding-system-list)))
-         (setq cs-decode 'utf-8-hfs
-               cs-encode 'utf-8-hfs))
        (set-process-coding-system proc cs-decode cs-encode)
        (tramp-message
         vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode)))



reply via email to

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