aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2012-12-06 10:15:27 +0100
committerMichael Albinus2012-12-06 10:15:27 +0100
commit5504e2c7ecd37115d4bb4105eca7b441336157f8 (patch)
tree3998547ee5414a6888028a5045c7c6be4c336556
parent4288142b39579bbae9ab3d118c756915f27077f5 (diff)
downloademacs-5504e2c7ecd37115d4bb4105eca7b441336157f8.tar.gz
emacs-5504e2c7ecd37115d4bb4105eca7b441336157f8.zip
* net/tramp.el (tramp-replace-environment-variables): Hide
compiler warning. (tramp-file-name-for-operation): Remove `executable-find', `start-process', `call-process' and `call-process-region'. * net/tramp-compat.el (top): Don't require 'tramp-util and 'tramp-vc. * net/tramp-gvfs.el (tramp-gvfs-dbus-event-error): Ensure backward compatibility. * net/tramp-sh.el (top): Remove `tramp-sh-handle-call-process-region'.
-rw-r--r--lisp/ChangeLog14
-rw-r--r--lisp/net/tramp-compat.el20
-rw-r--r--lisp/net/tramp-gvfs.el6
-rw-r--r--lisp/net/tramp-sh.el10
-rw-r--r--lisp/net/tramp.el11
5 files changed, 25 insertions, 36 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fbd6e3c631c..0c541a7d817 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,17 @@
12012-12-06 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-replace-environment-variables): Hide
4 compiler warning.
5 (tramp-file-name-for-operation): Remove `executable-find',
6 `start-process', `call-process' and `call-process-region'.
7
8 * net/tramp-compat.el (top): Don't require 'tramp-util and 'tramp-vc.
9
10 * net/tramp-gvfs.el (tramp-gvfs-dbus-event-error): Ensure backward
11 compatibility.
12
13 * net/tramp-sh.el (top): Remove `tramp-sh-handle-call-process-region'.
14
12012-12-06 Chong Yidong <cyd@gnu.org> 152012-12-06 Chong Yidong <cyd@gnu.org>
2 16
3 * ffap.el (ffap-replace-file-component): Fix typo. 17 * ffap.el (ffap-replace-file-component): Fix typo.
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index c3552ae023b..3d37a0cfc39 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -71,22 +71,6 @@
71 (require 'timer-funcs) 71 (require 'timer-funcs)
72 (require 'timer)) 72 (require 'timer))
73 73
74 ;; We check whether `start-file-process' is bound.
75 ;; Note: we deactivate this. There are problems, at least in SXEmacs.
76 (unless t;(fboundp 'start-file-process)
77
78 ;; tramp-util offers integration into other (X)Emacs packages like
79 ;; compile.el, gud.el etc. Not necessary in Emacs 23.
80 (eval-after-load "tramp"
81 '(require 'tramp-util))
82
83 ;; Make sure that we get integration with the VC package. When it
84 ;; is loaded, we need to pull in the integration module. Not
85 ;; necessary in Emacs 23.
86 (eval-after-load "vc"
87 (eval-after-load "tramp"
88 '(require 'tramp-vc))))
89
90 ;; Avoid byte-compiler warnings if the byte-compiler supports this. 74 ;; Avoid byte-compiler warnings if the byte-compiler supports this.
91 ;; Currently, XEmacs supports this. 75 ;; Currently, XEmacs supports this.
92 (when (featurep 'xemacs) 76 (when (featurep 'xemacs)
@@ -132,9 +116,7 @@
132 ;; mechanism. 116 ;; mechanism.
133 117
134 ;; `file-remote-p' has been introduced with Emacs 22. The version 118 ;; `file-remote-p' has been introduced with Emacs 22. The version
135 ;; of XEmacs is not a magic file name function (yet); this is 119 ;; of XEmacs is not a magic file name function (yet).
136 ;; corrected in tramp-util.el. Here it is sufficient if the
137 ;; function exists.
138 (unless (fboundp 'file-remote-p) 120 (unless (fboundp 'file-remote-p)
139 (defalias 'file-remote-p 121 (defalias 'file-remote-p
140 (lambda (file &optional identification connected) 122 (lambda (file &optional identification connected)
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 0aa1b8957ac..a4b2e0fccff 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -526,7 +526,11 @@ is no information where to trace the message.")
526 (tramp-message tramp-gvfs-dbus-event-vector 10 "%S" event) 526 (tramp-message tramp-gvfs-dbus-event-vector 10 "%S" event)
527 (tramp-error tramp-gvfs-dbus-event-vector 'file-error "%s" (cadr err)))) 527 (tramp-error tramp-gvfs-dbus-event-vector 'file-error "%s" (cadr err))))
528 528
529(add-hook 'dbus-event-error-functions 'tramp-gvfs-dbus-event-error) 529;; `dbus-event-error-hooks' has been renamed to `dbus-event-error-functions'.
530(add-hook
531 (if (boundp 'dbus-event-error-functions)
532 'dbus-event-error-functions 'dbus-event-error-hooks)
533 'tramp-gvfs-dbus-event-error)
530 534
531 535
532;; File name primitives. 536;; File name primitives.
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 79a1d8aec7d..55af0f0d96b 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2932,16 +2932,6 @@ the result will be a local, non-Tramp, filename."
2932 (keyboard-quit) 2932 (keyboard-quit)
2933 ret)))) 2933 ret))))
2934 2934
2935(defun tramp-sh-handle-call-process-region
2936 (start end program &optional delete buffer display &rest args)
2937 "Like `call-process-region' for Tramp files."
2938 (let ((tmpfile (tramp-compat-make-temp-file "")))
2939 (write-region start end tmpfile)
2940 (when delete (delete-region start end))
2941 (unwind-protect
2942 (apply 'call-process program tmpfile buffer display args)
2943 (delete-file tmpfile))))
2944
2945(defun tramp-sh-handle-file-local-copy (filename) 2935(defun tramp-sh-handle-file-local-copy (filename)
2946 "Like `file-local-copy' for Tramp files." 2936 "Like `file-local-copy' for Tramp files."
2947 (with-parsed-tramp-file-name filename nil 2937 (with-parsed-tramp-file-name filename nil
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index d6f2177b03b..a4d36cbe72c 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1750,10 +1750,12 @@ value of `default-file-modes', without execute permissions."
1750 1750
1751(defalias 'tramp-replace-environment-variables 1751(defalias 'tramp-replace-environment-variables
1752 (if (ignore-errors 1752 (if (ignore-errors
1753 (equal "${ tramp?}" (substitute-env-vars "${ tramp?}" 'only-defined))) 1753 (equal "${ tramp?}"
1754 (tramp-compat-funcall
1755 'substitute-env-vars "${ tramp?}" 'only-defined)))
1754 (lambda (filename) 1756 (lambda (filename)
1755 "Like `substitute-env-vars' with `only-defined' non-nil." 1757 "Like `substitute-env-vars' with `only-defined' non-nil."
1756 (substitute-env-vars filename 'only-defined)) 1758 (tramp-compat-funcall 'substitute-env-vars filename 'only-defined))
1757 (lambda (filename) 1759 (lambda (filename)
1758 "Replace environment variables in FILENAME. 1760 "Replace environment variables in FILENAME.
1759Return the string with the replaced variables." 1761Return the string with the replaced variables."
@@ -1928,10 +1930,7 @@ ARGS are the arguments OPERATION has been called with."
1928 ;; Emacs 23+ only. 1930 ;; Emacs 23+ only.
1929 'start-file-process 1931 'start-file-process
1930 ;; XEmacs only. 1932 ;; XEmacs only.
1931 'dired-print-file 'dired-shell-call-process 1933 'dired-print-file 'dired-shell-call-process))
1932 ;; nowhere yet.
1933 'executable-find 'start-process
1934 'call-process 'call-process-region))
1935 default-directory) 1934 default-directory)
1936 ;; Unknown file primitive. 1935 ;; Unknown file primitive.
1937 (t (error "unknown file I/O primitive: %s" operation)))) 1936 (t (error "unknown file I/O primitive: %s" operation))))