Mercurial > emacs
comparison lisp/net/tramp.el @ 85841:0c0a9419b0c4
* net/tramp.el (tramp-handle-shell-command): Call `start-file-process'
directly. Fix bug in deleting temp file.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Wed, 31 Oct 2007 20:04:42 +0000 |
parents | a69014d11d95 |
children | 8bf6b9dbfa26 |
comparison
equal
deleted
inserted
replaced
85840:d227ffcaa3fe | 85841:0c0a9419b0c4 |
---|---|
3775 (with-parsed-tramp-file-name default-directory nil | 3775 (with-parsed-tramp-file-name default-directory nil |
3776 (list output-buffer (tramp-make-tramp-temp-file v))) | 3776 (list output-buffer (tramp-make-tramp-temp-file v))) |
3777 output-buffer))) | 3777 output-buffer))) |
3778 | 3778 |
3779 (prog1 | 3779 (prog1 |
3780 ;; Run the process. We cannot use `process-file' and | 3780 ;; Run the process. |
3781 ;; `start-file-process', because these functions might not | |
3782 ;; exist in older Emacsen. | |
3783 (if (integerp asynchronous) | 3781 (if (integerp asynchronous) |
3784 (apply 'tramp-handle-start-file-process | 3782 (apply 'start-file-process "*Async Shell*" buffer args) |
3785 "*Async Shell*" buffer args) | 3783 (apply 'process-file (car args) nil buffer nil (cdr args))) |
3786 (apply 'process-file | |
3787 (car args) nil buffer nil (cdr args))) | |
3788 ;; Insert error messages if they were separated. | 3784 ;; Insert error messages if they were separated. |
3789 (when (listp buffer) | 3785 (when (listp buffer) |
3790 (with-current-buffer error-buffer | 3786 (with-current-buffer error-buffer (insert-file-contents (cadr buffer))) |
3791 (insert-file-contents (cadr buffer))) | 3787 (delete-file (cadr buffer))) |
3792 (delete-file (buffer-file-name (cadr buffer)))) | |
3793 ;; There's some output, display it. | 3788 ;; There's some output, display it. |
3794 (when (with-current-buffer output-buffer (> (point-max) (point-min))) | 3789 (when (with-current-buffer output-buffer (> (point-max) (point-min))) |
3795 (if (functionp 'display-message-or-buffer) | 3790 (if (functionp 'display-message-or-buffer) |
3796 (funcall (symbol-function 'display-message-or-buffer) output-buffer) | 3791 (funcall (symbol-function 'display-message-or-buffer) output-buffer) |
3797 (pop-to-buffer output-buffer)))))) | 3792 (pop-to-buffer output-buffer)))))) |