Commit 5504e2c7 authored by Michael Albinus's avatar Michael Albinus

* 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'.
parent 4288142b
2012-12-06 Michael Albinus <michael.albinus@gmx.de>
* 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'.
2012-12-06 Chong Yidong <cyd@gnu.org>
* ffap.el (ffap-replace-file-component): Fix typo.
......
......@@ -71,22 +71,6 @@
(require 'timer-funcs)
(require 'timer))
;; We check whether `start-file-process' is bound.
;; Note: we deactivate this. There are problems, at least in SXEmacs.
(unless t;(fboundp 'start-file-process)
;; tramp-util offers integration into other (X)Emacs packages like
;; compile.el, gud.el etc. Not necessary in Emacs 23.
(eval-after-load "tramp"
'(require 'tramp-util))
;; Make sure that we get integration with the VC package. When it
;; is loaded, we need to pull in the integration module. Not
;; necessary in Emacs 23.
(eval-after-load "vc"
(eval-after-load "tramp"
'(require 'tramp-vc))))
;; Avoid byte-compiler warnings if the byte-compiler supports this.
;; Currently, XEmacs supports this.
(when (featurep 'xemacs)
......@@ -132,9 +116,7 @@
;; mechanism.
;; `file-remote-p' has been introduced with Emacs 22. The version
;; of XEmacs is not a magic file name function (yet); this is
;; corrected in tramp-util.el. Here it is sufficient if the
;; function exists.
;; of XEmacs is not a magic file name function (yet).
(unless (fboundp 'file-remote-p)
(defalias 'file-remote-p
(lambda (file &optional identification connected)
......
......@@ -526,7 +526,11 @@ is no information where to trace the message.")
(tramp-message tramp-gvfs-dbus-event-vector 10 "%S" event)
(tramp-error tramp-gvfs-dbus-event-vector 'file-error "%s" (cadr err))))
(add-hook 'dbus-event-error-functions 'tramp-gvfs-dbus-event-error)
;; `dbus-event-error-hooks' has been renamed to `dbus-event-error-functions'.
(add-hook
(if (boundp 'dbus-event-error-functions)
'dbus-event-error-functions 'dbus-event-error-hooks)
'tramp-gvfs-dbus-event-error)
;; File name primitives.
......
......@@ -2932,16 +2932,6 @@ the result will be a local, non-Tramp, filename."
(keyboard-quit)
ret))))
(defun tramp-sh-handle-call-process-region
(start end program &optional delete buffer display &rest args)
"Like `call-process-region' for Tramp files."
(let ((tmpfile (tramp-compat-make-temp-file "")))
(write-region start end tmpfile)
(when delete (delete-region start end))
(unwind-protect
(apply 'call-process program tmpfile buffer display args)
(delete-file tmpfile))))
(defun tramp-sh-handle-file-local-copy (filename)
"Like `file-local-copy' for Tramp files."
(with-parsed-tramp-file-name filename nil
......
......@@ -1750,10 +1750,12 @@ value of `default-file-modes', without execute permissions."
(defalias 'tramp-replace-environment-variables
(if (ignore-errors
(equal "${ tramp?}" (substitute-env-vars "${ tramp?}" 'only-defined)))
(equal "${ tramp?}"
(tramp-compat-funcall
'substitute-env-vars "${ tramp?}" 'only-defined)))
(lambda (filename)
"Like `substitute-env-vars' with `only-defined' non-nil."
(substitute-env-vars filename 'only-defined))
(tramp-compat-funcall 'substitute-env-vars filename 'only-defined))
(lambda (filename)
"Replace environment variables in FILENAME.
Return the string with the replaced variables."
......@@ -1928,10 +1930,7 @@ ARGS are the arguments OPERATION has been called with."
;; Emacs 23+ only.
'start-file-process
;; XEmacs only.
'dired-print-file 'dired-shell-call-process
;; nowhere yet.
'executable-find 'start-process
'call-process 'call-process-region))
'dired-print-file 'dired-shell-call-process))
default-directory)
;; Unknown file primitive.
(t (error "unknown file I/O primitive: %s" operation))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment