[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 8ca864b 2/2: Sync with Tramp 2.2.13
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] emacs-25 8ca864b 2/2: Sync with Tramp 2.2.13 |
Date: |
Tue, 29 Dec 2015 14:36:07 +0000 |
branch: emacs-25
commit 8ca864ba8df6c2214dcaa9c8d1c9aa069a62db06
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Sync with Tramp 2.2.13
* doc/misc/trampver.texi: Change version to "2.2.13.25.1".
* lisp/net/tramp-compat.el (tramp-compat-delete-dups):
Use `tramp-compat-funcall'.
* lisp/net/tramp-gvfs.el (tramp-gvfs-parse-device-names):
Make `split-string' call compatible with older Emacsen.
* lisp/net/trampver.el: Change version to "2.2.13.25.1".
---
doc/misc/trampver.texi | 2 +-
lisp/net/tramp-compat.el | 3 ++-
lisp/net/tramp-gvfs.el | 13 +++++++++----
lisp/net/tramp-sh.el | 7 +++----
lisp/net/trampver.el | 2 +-
5 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi
index a303219..4366796 100644
--- a/doc/misc/trampver.texi
+++ b/doc/misc/trampver.texi
@@ -8,7 +8,7 @@
@c In the Tramp GIT, the version number is auto-frobbed from
@c configure.ac, so you should edit that file and run
@c "autoconf && ./configure" to change the version number.
address@hidden trampver 2.2.13-25.1
address@hidden trampver 2.2.13.25.1
@c Other flags from configuration
@set instprefix /usr/local
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index c571028..b6d6796 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -600,7 +600,8 @@ and replace a sub-expression, e.g.
Store the result in LIST and return it. LIST must be a proper list.
Of several `equal' occurrences of an element in LIST, the first
one is kept."
- (cl-delete-duplicates list '(:test equal :from-end) nil)))
+ (tramp-compat-funcall
+ 'cl-delete-duplicates list '(:test equal :from-end) nil)))
(add-hook 'tramp-unload-hook
(lambda ()
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index c5a6075..549d3b1 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1740,20 +1740,25 @@ be used."
(list user host)))
(zeroconf-list-services service)))
+;; We use the TRIM argument of `split-string', which exist since Emacs
+;; 24.4. I mask this for older Emacs versions, there is no harm.
(defun tramp-gvfs-parse-device-names (service)
"Return a list of (user host) tuples allowed to access.
This uses \"avahi-browse\" in case D-Bus is not enabled in Avahi."
(let ((result
- (split-string
- (shell-command-to-string (format "avahi-browse -trkp %s" service))
- "[\n\r]+" 'omit "^\\+;.*$")))
+ (ignore-errors
+ (tramp-compat-funcall
+ 'split-string
+ (shell-command-to-string (format "avahi-browse -trkp %s" service))
+ "[\n\r]+" 'omit "^\\+;.*$"))))
(tramp-compat-delete-dups
(mapcar
(lambda (x)
(let* ((list (split-string x ";"))
(host (nth 6 list))
(port (nth 8 list))
- (text (split-string (nth 9 list) "\" \"" 'omit "\""))
+ (text (tramp-compat-funcall
+ 'split-string (nth 9 list) "\" \"" 'omit "\""))
user)
; (when (and port (not (string-equal port "0")))
; (setq host (format "%s%s%s" host tramp-prefix-port-regexp port)))
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index aebfe42..0dd2440 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -5425,9 +5425,6 @@ Return ATTR."
(save-match-data
(with-tramp-connection-property vec "ls-quoting-style"
(tramp-message vec 5 "Checking, whether `ls --quoting-style=shell'
works")
- ;; Some "ls" versions are sensible wrt the order of arguments,
- ;; they fail when "-al" is after the "--dired" argument (for
- ;; example on FreeBSD).
(tramp-send-command-and-check
vec (format "%s --quoting-style=shell -al /dev/null"
(tramp-get-ls-command vec))))))
@@ -5436,7 +5433,9 @@ Return ATTR."
(save-match-data
(with-tramp-connection-property vec "ls-w-option"
(tramp-message vec 5 "Checking, whether `ls -w' works")
- ;; Option "-w" is available on BSD systems.
+ ;; Option "-w" is available on BSD systems. No argument is
+ ;; given, because this could return wrong results in case "ls"
+ ;; supports the "-w NUM" argument, as for busyboxes.
(tramp-send-command-and-check
vec (format "%s -alw" (tramp-get-ls-command vec))))))
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 77ee8ae..f93cfc4 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -63,7 +63,7 @@
(= emacs-major-version 21)
(>= emacs-minor-version 4)))
"ok"
- (format "Tramp 2.2.13-pre is not fit for %s"
+ (format "Tramp 2.2.13.25.1 is not fit for %s"
(when (string-match "^.*$" (emacs-version))
(match-string 0 (emacs-version)))))))
(unless (string-match "\\`ok\\'" x) (error "%s" x)))