]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp.el (tramp-replace-environment-variables): Hide
authorMichael Albinus <michael.albinus@gmx.de>
Thu, 6 Dec 2012 09:15:27 +0000 (10:15 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Thu, 6 Dec 2012 09:15:27 +0000 (10:15 +0100)
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'.

lisp/ChangeLog
lisp/net/tramp-compat.el
lisp/net/tramp-gvfs.el
lisp/net/tramp-sh.el
lisp/net/tramp.el

index fbd6e3c631ced2ea46269ee46d86be02915e8d71..0c541a7d817ab852c026d865b3a6ca2856c72f1a 100644 (file)
@@ -1,3 +1,17 @@
+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.
index c3552ae023b82f8ee08174b38a95fa74073525e3..3d37a0cfc391f78c5776dd296eed8390e1fdd5e0 100644 (file)
       (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)
   ;; 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)
index 0aa1b8957ac320f7961c8bcaca623316ea643134..a4b2e0fccff39d410842381e23ed3f46d436ccbb 100644 (file)
@@ -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)
 
 \f
 ;; File name primitives.
index 79a1d8aec7d14d6aa54100b5d32731fa58571644..55af0f0d96b7e5042500d8798c5aa81ebd80205b 100644 (file)
@@ -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
index d6f2177b03b5a56fa43381f902888ded23207abf..a4d36cbe72c0e439b702fa5bf63b72cef41307eb 100644 (file)
@@ -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))))