Mercurial > emacs
diff lisp/net/tramp.el @ 57653:b324ca4df07c
* simple.el (process-file): New function, similar to call-process
but supports file handlers.
* vc.el (vc-do-command): Use it, instead of call-process.
* net/tramp-vc.el (vc-do-command): Do not advise it if
process-file is fboundp.
* net/tramp.el (tramp-file-name-handler-alist): Add entry for
process-file.
(tramp-handle-process-file): New function.
(tramp-file-name-for-operation): Support process-file.
author | Kai Großjohann <kgrossjo@eu.uu.net> |
---|---|
date | Sat, 23 Oct 2004 19:52:18 +0000 |
parents | 07791c7d465b |
children | 07404103ed02 0fe073a08cef |
line wrap: on
line diff
--- a/lisp/net/tramp.el Sat Oct 23 16:13:06 2004 +0000 +++ b/lisp/net/tramp.el Sat Oct 23 19:52:18 2004 +0000 @@ -1770,6 +1770,7 @@ (delete-file . tramp-handle-delete-file) (directory-file-name . tramp-handle-directory-file-name) (shell-command . tramp-handle-shell-command) + (process-file . tramp-handle-process-file) (insert-directory . tramp-handle-insert-directory) (expand-file-name . tramp-handle-expand-file-name) (file-local-copy . tramp-handle-file-local-copy) @@ -3469,6 +3470,18 @@ (tramp-run-real-handler 'shell-command (list command output-buffer error-buffer)))) +(defun tramp-handle-process-file (program &optional infile buffer display &rest args) + "Like `process-file' for Tramp files." + (when infile (error "Implementation does not handle input from file")) + (when (and (numberp buffer) (zerop buffer)) + (error "Implementation does not handle immediate return")) + (when (consp buffer) (error "Implementation does not handle error files")) + (shell-command + (mapconcat 'tramp-shell-quote-argument + (cons program args) + " ") + buffer)) + ;; File Editing. (defsubst tramp-make-temp-file () @@ -3960,6 +3973,8 @@ ; COMMAND ((member operation (list 'dired-call-process 'shell-command + ; Post Emacs 21.3 only + 'process-file ; XEmacs only 'dired-print-file 'dired-shell-call-process)) default-directory)