From: Michael Albinus Date: Thu, 6 Dec 2012 09:15:27 +0000 (+0100) Subject: * net/tramp.el (tramp-replace-environment-variables): Hide X-Git-Tag: emacs-24.3.90~173^2~9^2~36 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5504e2c7ecd37115d4bb4105eca7b441336157f8;p=emacs.git * 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'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fbd6e3c631c..0c541a7d817 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2012-12-06 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'. + 2012-12-06 Chong Yidong * 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 @@ (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) 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.") (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. 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." (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 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." (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))))