comparison lisp/net/ange-ftp.el @ 81758:f03856eb136b

* files.el (file-remote-p): Introduce optional parameter CONNECTED. * net/tramp.el: * net/tramp-ftp.el: * net/tramp-smb.el: * net/tramp-uu.el: * net/trampver.el: Migrate to Tramp 2.1. * net/tramp-cache.el: * net/tramp-fish.el: * net/tramp-gw.el: New Tramp packages. * net/tramp-util.el: * net/tramp-vc.el: Removed. * net/ange-ftp.el: Add ange-ftp property to 'start-file-process (ange-ftp-file-remote-p): Handle optional parameter CONNECTED. * net/rcompile.el (remote-compile): Handle Tramp 2.1 arguments. * progmodes/compile.el (compilation-start): Redefine `start-process' temporarily when `default-directory' is remote. Remove case of synchronous compilation, this won't happen ever. (compilation-setup): Make local variable `comint-file-name-prefix' for remote compilation.
author Michael Albinus <michael.albinus@gmx.de>
date Sun, 08 Jul 2007 18:03:20 +0000
parents 8e5203081e80
children c2b7868011b1 988f1edc9674
comparison
equal deleted inserted replaced
81757:d4e68ecdb000 81758:f03856eb136b
4130 (let ((tmp1 (ange-ftp-make-tmp-name (car pa1)))) 4130 (let ((tmp1 (ange-ftp-make-tmp-name (car pa1))))
4131 (ange-ftp-copy-file-internal fn1 tmp1 t nil 4131 (ange-ftp-copy-file-internal fn1 tmp1 t nil
4132 (format "Getting %s" fn1)) 4132 (format "Getting %s" fn1))
4133 tmp1)))) 4133 tmp1))))
4134 4134
4135 (defun ange-ftp-file-remote-p (file) 4135 (defun ange-ftp-file-remote-p (file &optional connected)
4136 (ange-ftp-replace-name-component file "")) 4136 (and (or (not connected)
4137 (let* ((parsed (ange-ftp-ftp-name file))
4138 (host (nth 0 parsed))
4139 (user (nth 1 parsed))
4140 (proc (get-process (ange-ftp-ftp-process-buffer host user))))
4141 (and proc (processp proc)
4142 (memq (process-status proc) '(run open)))))
4143 (ange-ftp-replace-name-component file "")))
4137 4144
4138 (defun ange-ftp-load (file &optional noerror nomessage nosuffix) 4145 (defun ange-ftp-load (file &optional noerror nomessage nosuffix)
4139 (if (ange-ftp-ftp-name file) 4146 (if (ange-ftp-ftp-name file)
4140 (let ((tryfiles (if nosuffix 4147 (let ((tryfiles (if nosuffix
4141 (list file) 4148 (list file)
4358 4365
4359 ;; Turn off RCS/SCCS processing to save time. 4366 ;; Turn off RCS/SCCS processing to save time.
4360 ;; This returns nil for any file name as argument. 4367 ;; This returns nil for any file name as argument.
4361 (put 'vc-registered 'ange-ftp 'null) 4368 (put 'vc-registered 'ange-ftp 'null)
4362 4369
4370 ;; We can handle process-file in a restricted way (just for chown).
4371 ;; Nothing possible for start-file-process.
4363 (put 'process-file 'ange-ftp 'ange-ftp-process-file) 4372 (put 'process-file 'ange-ftp 'ange-ftp-process-file)
4373 (put 'start-file-process 'ange-ftp 'ignore)
4364 (put 'shell-command 'ange-ftp 'ange-ftp-shell-command) 4374 (put 'shell-command 'ange-ftp 'ange-ftp-shell-command)
4365 4375
4366 ;;; Define ways of getting at unmodified Emacs primitives, 4376 ;;; Define ways of getting at unmodified Emacs primitives,
4367 ;;; turning off our handler. 4377 ;;; turning off our handler.
4368 4378