]> code.delx.au - gnu-emacs/commitdiff
* net/tramp-sh.el (tramp-get-remote-locale): Return "LC_ALL=C" as
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 22 Nov 2014 09:30:36 +0000 (10:30 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 22 Nov 2014 09:30:36 +0000 (10:30 +0100)
fallback.
(tramp-open-connection-setup-interactive-shell): No need to check
for nil as `tramp-get-remote-locale' return value.

lisp/ChangeLog
lisp/net/tramp-sh.el

index 1ce22d0fdbd1188d58c5800243ec03cb796e8331..148d77ffa9c4cbd448d61534bd65be494cc554b7 100644 (file)
@@ -1,3 +1,10 @@
+2014-11-22  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-sh.el (tramp-get-remote-locale): Return "LC_ALL=C" as
+       fallback.
+       (tramp-open-connection-setup-interactive-shell): No need to check
+       for nil as `tramp-get-remote-locale' return value.
+
 2014-11-21  Eli Zaretskii  <eliz@gnu.org>
 
        * vc/vc-git.el (vc-git-command, vc-git--call): Bind
index 21ec741d3983e9224866e0bc79a3ffe52ef76618..ff00b55756d24f6bdead48d58823288ced4ce22d 100644 (file)
@@ -3972,8 +3972,7 @@ process to set up.  VEC specifies the connection."
        ;; Use MULE to select the right EOL convention for communicating
        ;; with the process.
        (let ((cs (or (and (memq 'utf-8 (coding-system-list))
-                          (string-match
-                           "utf8" (or (tramp-get-remote-locale vec) ""))
+                          (string-match "utf8" (tramp-get-remote-locale vec))
                           (cons 'utf-8 'utf-8))
                      (tramp-compat-funcall 'process-coding-system proc)
                      (cons 'undecided 'undecided)))
@@ -4080,8 +4079,7 @@ process to set up.  VEC specifies the connection."
   ;; Set the environment.
   (tramp-message vec 5 "Setting default environment")
 
-  (let ((env (append (when (tramp-get-remote-locale vec) ; Discard `(nil)'.
-                      `(,(tramp-get-remote-locale vec)))
+  (let ((env (append `(,(tramp-get-remote-locale vec))
                     (copy-sequence tramp-remote-process-environment)))
        unset vars item)
     (while env
@@ -5077,7 +5075,7 @@ Return ATTR."
 (defun tramp-get-remote-locale (vec)
   (with-tramp-connection-property vec "locale"
     (tramp-send-command vec "locale -a")
-    (let ((candidates '("en_US.utf8" "C.utf8" "C"))
+    (let ((candidates '("en_US.utf8" "C.utf8"))
          locale)
       (with-current-buffer (tramp-get-connection-buffer vec)
        (while candidates
@@ -5087,7 +5085,7 @@ Return ATTR."
                    candidates nil)
            (setq candidates (cdr candidates)))))
       ;; Return value.
-      (when locale (format "LC_ALL=%s" locale)))))
+      (format "LC_ALL=%s" (or locale "C")))))
 
 (defun tramp-get-ls-command (vec)
   (with-tramp-connection-property vec "ls"