aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2013-02-22 15:05:38 +0100
committerMichael Albinus2013-02-22 15:05:38 +0100
commit29bb19dc10d3bd1a79150ff87f8f6a773d894654 (patch)
treeb7bd99e38c1a78f90d259b04d3c0043240f32841
parent2c7d2007671a661f7b147b0e80f60bfe9271e071 (diff)
downloademacs-29bb19dc10d3bd1a79150ff87f8f6a773d894654.tar.gz
emacs-29bb19dc10d3bd1a79150ff87f8f6a773d894654.zip
* net/tramp.el (tramp-tramp-file-p): Fix docstring.
* net/tramp-sh.el (tramp-sh-handle-insert-directory): Handle multibyte file names.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/net/tramp-sh.el12
-rw-r--r--lisp/net/tramp.el6
3 files changed, 19 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c6c9d93ed97..6496fe998d3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12013-02-22 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-tramp-file-p): Fix docstring.
4
5 * net/tramp-sh.el (tramp-sh-handle-insert-directory): Handle
6 multibyte file names.
7
12013-02-22 Glenn Morris <rgm@gnu.org> 82013-02-22 Glenn Morris <rgm@gnu.org>
2 9
3 * textmodes/sgml-mode.el (sgml-xml-mode): Move before use. 10 * textmodes/sgml-mode.el (sgml-xml-mode): Move before use.
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 82cbda57086..f2dc514116a 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2606,10 +2606,13 @@ This is like `dired-recursive-delete-directory' for Tramp files."
2606 (if full-directory-p "yes" "no")) 2606 (if full-directory-p "yes" "no"))
2607 ;; If `full-directory-p', we just say `ls -l FILENAME'. 2607 ;; If `full-directory-p', we just say `ls -l FILENAME'.
2608 ;; Else we chdir to the parent directory, then say `ls -ld BASENAME'. 2608 ;; Else we chdir to the parent directory, then say `ls -ld BASENAME'.
2609 ;; "--dired" returns byte positions. Therefore, the file names
2610 ;; must be encoded, which is guaranteed by "LC_ALL=en_US.UTF8
2611 ;; LC_CTYPE=''".
2609 (if full-directory-p 2612 (if full-directory-p
2610 (tramp-send-command 2613 (tramp-send-command
2611 v 2614 v
2612 (format "%s %s %s 2>/dev/null" 2615 (format "env LC_ALL=en_US.UTF8 LC_CTYPE='' %s %s %s 2>/dev/null"
2613 (tramp-get-ls-command v) 2616 (tramp-get-ls-command v)
2614 switches 2617 switches
2615 (if wildcard 2618 (if wildcard
@@ -2625,7 +2628,7 @@ This is like `dired-recursive-delete-directory' for Tramp files."
2625 (tramp-run-real-handler 'file-name-directory (list localname)))) 2628 (tramp-run-real-handler 'file-name-directory (list localname))))
2626 (tramp-send-command 2629 (tramp-send-command
2627 v 2630 v
2628 (format "%s %s %s" 2631 (format "env LC_ALL=en_US.UTF8 LC_CTYPE='' %s %s %s"
2629 (tramp-get-ls-command v) 2632 (tramp-get-ls-command v)
2630 switches 2633 switches
2631 (if (or wildcard 2634 (if (or wildcard
@@ -2671,6 +2674,11 @@ This is like `dired-recursive-delete-directory' for Tramp files."
2671 (while (re-search-forward tramp-color-escape-sequence-regexp nil t) 2674 (while (re-search-forward tramp-color-escape-sequence-regexp nil t)
2672 (replace-match ""))) 2675 (replace-match "")))
2673 2676
2677 ;; Decode the output, it could be multibyte.
2678 (decode-coding-region
2679 beg (point-max)
2680 (or file-name-coding-system default-file-name-coding-system))
2681
2674 ;; The inserted file could be from somewhere else. 2682 ;; The inserted file could be from somewhere else.
2675 (when (and (not wildcard) (not full-directory-p)) 2683 (when (and (not wildcard) (not full-directory-p))
2676 (goto-char (point-max)) 2684 (goto-char (point-max))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 4bfe541f053..fe4959715d5 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1166,11 +1166,9 @@ If the `tramp-methods' entry does not exist, return nil."
1166 1166
1167;;;###tramp-autoload 1167;;;###tramp-autoload
1168(defun tramp-tramp-file-p (name) 1168(defun tramp-tramp-file-p (name)
1169 "Return t if NAME is a string with Tramp file name syntax. 1169 "Return t if NAME is a string with Tramp file name syntax."
1170It checks also, whether NAME is unibyte encoded."
1171 (save-match-data 1170 (save-match-data
1172 (and (stringp name) 1171 (and (stringp name)
1173; (string-equal name (string-as-unibyte name))
1174 (string-match tramp-file-name-regexp name)))) 1172 (string-match tramp-file-name-regexp name))))
1175 1173
1176(defun tramp-find-method (method user host) 1174(defun tramp-find-method (method user host)
@@ -1354,7 +1352,7 @@ The outline level is equal to the verbosity of the Tramp message."
1354 (get-buffer-create (tramp-debug-buffer-name vec)) 1352 (get-buffer-create (tramp-debug-buffer-name vec))
1355 (when (bobp) 1353 (when (bobp)
1356 (setq buffer-undo-list t) 1354 (setq buffer-undo-list t)
1357 ;; So it does not get loaded while outline-regexp is let-bound. 1355 ;; So it does not get loaded while `outline-regexp' is let-bound.
1358 (require 'outline) 1356 (require 'outline)
1359 ;; Activate `outline-mode'. This runs `text-mode-hook' and 1357 ;; Activate `outline-mode'. This runs `text-mode-hook' and
1360 ;; `outline-mode-hook'. We must prevent that local processes 1358 ;; `outline-mode-hook'. We must prevent that local processes