+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
;; 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)))
;; 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
(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
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"